It looks like that's happening because the CONTENT-LENGTH header is being
processed AFTER the TRANSFER-ENCODING header (because that's the order the
server is returning them) in THTTPSend.HTTPMethod().

When the TRANSFER-ENCODING header is processed the FTransferEncoding field
is properly set to TE_CHUNKED, *but* then HTTPMethod() finds the
CONTENT-LENGTH header and (re)sets FTransferEncoding to TE_IDENTITY.

Lukas,

Maybe this can be fixed by changing the following code in HTTPMethod? (It
seems to work in preliminary testing here.)

--Change--

      if Pos('CONTENT-LENGTH:', su) = 1 then
      begin
        Size := StrToIntDef(Trim(SeparateRight(s, ' ')), -1);
        if Size <> -1 then
          FTransferEncoding := TE_IDENTITY;
      end;

--to--

      if Pos('CONTENT-LENGTH:', su) = 1 then
      begin
        Size := StrToIntDef(Trim(SeparateRight(s, ' ')), -1);
        if (Size <> -1) and (FTransferEncoding = TE_UNKNOWN) then               
<--
CHANGES
          FTransferEncoding := TE_IDENTITY;
      end;


-------------------------------------------------------------------------
This SF.net email is sponsored by: Splunk Inc.
Still grepping through log files to find problems?  Stop.
Now Search log events and configuration files using AJAX and a browser.
Download your FREE copy of Splunk now >> http://get.splunk.com/
_______________________________________________
synalist-public mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/synalist-public

Reply via email to