diff --git a/URestemplateApp.pas b/URestemplateApp.pas
index c54b3be..01556ab 100644
--- a/URestemplateApp.pas
+++ b/URestemplateApp.pas
@@ -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
diff --git a/indy/Protocols/IdHTTPHeaderInfo.pas b/indy/Protocols/IdHTTPHeaderInfo.pas
index 96d12c8..0224d81 100644
--- a/indy/Protocols/IdHTTPHeaderInfo.pas
+++ b/indy/Protocols/IdHTTPHeaderInfo.pas
@@ -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;
diff --git a/restemplate.lpi b/restemplate.lpi
index 3497a1a..bc6d31e 100644
--- a/restemplate.lpi
+++ b/restemplate.lpi
@@ -19,7 +19,8 @@
-
+
+