fpc_http_protocol.pas : Delete the "Content-length" header so the underlying component set its value. (Thanks to Phil)

git-svn-id: https://svn.code.sf.net/p/lazarus-ccr/svn@2242 8e941d3f-bd1b-0410-a28a-d453659cc2b4
This commit is contained in:
inoussa
2012-01-10 09:24:29 +00:00
parent e76862159f
commit 58a55210d5

View File

@ -131,10 +131,14 @@ end;
procedure THTTPTransport.DoSendAndReceive(ARequest, AResponse: TStream);
var
EMsg : String;
i : Integer;
begin
try
ARequest.position:=0;
FConnection.RequestBody:=ARequest;
i := FConnection.IndexOfHeader('Content-length');
if (i >= 0) then
FConnection.RequestHeaders.Delete(i);
FConnection.Post(FAddress,AResponse);
except
On E : Exception do