mirror of
https://gitlab.com/freepascal.org/fpc/source.git
synced 2025-04-21 12:49:33 +02:00
* Set NameValueSeparator both on request and response (so response Location is read correctly)
git-svn-id: trunk@34063 -
This commit is contained in:
parent
c8354993c1
commit
af66f2f984
@ -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;
|
||||
|
Loading…
Reference in New Issue
Block a user