danieleteti / delphimvcframework

DMVCFramework (for short) is a popular and powerful framework for WEB API in Delphi. Supports RESTful and JSON-RPC WEB APIs development.

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

No support for 'identity' value in content-encoding header

jadeade opened this issue · comments

Hi!

I recently found a service that was using 'identity' value for the content-encoding header when downloading a file, and this was generating a content-encoding value not supported exception. Seems that the framework only expects content-encoding to be empty (or no present?) if no decoding is needed

This seems to be an easy fix, I just needed to add to MVCFramework.RESTClient.TRESTClient.SendHTTPCommand an additional check to the line that checks that no decoding is needed:

  if Result.ContentEncoding.IsEmpty or (Result.ContentEncoding = 'identity') then
    Exit;

I am using v3.0 but I checked the current version code and I didn't find this fixed. Could you have a look? Maybe this could be needed to be added in other places on both the client and server side?

I just requested the server owner to use gzip encoding and everything worked fine, just wanted to raise the hand about this

Thanks for the nice work!

Thanks, fixed in the repo