Fixed Indy to correctly assign request headers
This commit is contained in:
parent
2c8721bc20
commit
b260f184f8
|
@ -387,6 +387,8 @@ var
|
|||
jsonData: TJSONData;
|
||||
contentType: TContentType;
|
||||
xmlDoc: TXMLDocument;
|
||||
//
|
||||
i: Integer;
|
||||
begin
|
||||
FParser.Content := AURL;
|
||||
FParser.Replace;
|
||||
|
@ -412,9 +414,6 @@ begin
|
|||
FHttp.Request := FRequest;
|
||||
FHttp.HTTPOptions := FHttp.HTTPOptions + [hoNoProtocolErrorException];
|
||||
|
||||
// Workaround for CustomHeaders not being assigned :-/
|
||||
FHttp.Request.CustomHeaders.AddStrings(FRequest.CustomHeaders);
|
||||
|
||||
if SameText('POST', FMethod) and (FFormFields.Count > 0) then
|
||||
FHttp.Post(AURL, FFormFields, response)
|
||||
else
|
||||
|
|
|
@ -336,6 +336,7 @@ begin
|
|||
begin
|
||||
LDest := TIdEntityHeaderInfo(Destination);
|
||||
LDest.FRawHeaders.Assign(FRawHeaders);
|
||||
LDest.FCustomHeaders.Assign(FCustomHeaders);
|
||||
LDest.FCacheControl := FCacheControl;
|
||||
LDest.FCharSet := FCharSet;
|
||||
LDest.FContentDisposition := FContentDisposition;
|
||||
|
@ -966,9 +967,9 @@ begin
|
|||
// TODO: omitted intentionally?
|
||||
// LDest.FHost := FHost;
|
||||
// LDest.FProxyConnection := FProxyConnection;
|
||||
end else begin
|
||||
inherited AssignTo(Destination);
|
||||
end;
|
||||
|
||||
inherited AssignTo(Destination);
|
||||
end;
|
||||
|
||||
procedure TIdRequestHeaderInfo.Clear;
|
||||
|
|
|
@ -19,7 +19,8 @@
|
|||
<VersionInfo>
|
||||
<UseVersionInfo Value="True"/>
|
||||
<MinorVersionNr Value="6"/>
|
||||
<StringTable LegalCopyright="Andreas Schneider" ProductName="restemplate" ProductVersion="0.6.0"/>
|
||||
<RevisionNr Value="1"/>
|
||||
<StringTable LegalCopyright="Andreas Schneider" ProductName="restemplate" ProductVersion="0.6.1"/>
|
||||
</VersionInfo>
|
||||
<MacroValues Count="1">
|
||||
<Macro1 Name="LCLWidgetType" Value="nogui"/>
|
||||
|
|
Loading…
Reference in New Issue