* Set NameValueSeparator both on request and response (so response Location is read correctly)

git-svn-id: trunk@34063 -
This commit is contained in:
michael 2016-07-04 12:25:40 +00:00
parent c8354993c1
commit af66f2f984

View File

@ -113,9 +113,16 @@ end;
{ TFPHTTPWebClient }
Function TFPHTTPWebClient.DoCreateRequest: TWebClientRequest;
Var
C : TFPHTTPClient;
begin
Result:=TFPHTTPRequest.Create(TFPHTTPClient.Create(Self));
Result.Headers.NameValueSeparator:=':';
C:=TFPHTTPClient.Create(Self);
C.RequestHeaders.NameValueSeparator:=':';
C.ResponseHeaders.NameValueSeparator:=':';
// C.HTTPversion:='1.0';
Result:=TFPHTTPRequest.Create(C);
end;
Function TFPHTTPWebClient.DoHTTPMethod(Const AMethod, AURL: String;
@ -124,7 +131,7 @@ Function TFPHTTPWebClient.DoHTTPMethod(Const AMethod, AURL: String;
Var
U,S : String;
h : TFPHTTPClient;
Res : Boolean;
begin
U:=AURL;
@ -145,7 +152,7 @@ begin
H.RequestBody:=ARequest.Content;
H.RequestBody.Position:=0;
end;
H.HTTPMethod(AMethod,U,Result.Content,[]); // Will rais an exception
H.HTTPMethod(AMethod,U,Result.Content,[]); // Will raise an exception
except
FreeAndNil(Result);
Raise;