Browse Source

Patch from NevTon to fix a bug in TIdHTTPProtocol.ProcessResponse() accessing the wrong TIdHTTPResponse object when raising EIdHTTPProtocolException for a response from an HTTP proxy.

RemyLebeau 6 years ago
parent
commit
cbed5697e7
1 changed files with 2 additions and 2 deletions
  1. 2 2
      Lib/Source/IdHTTP.pas

+ 2 - 2
Lib/Source/IdHTTP.pas

@@ -2776,8 +2776,8 @@ var
         end;
         if LRaiseException then begin
           LTempStream.Position := 0;
-          raise EIdHTTPProtocolException.CreateError(LResponseCode, FHTTP.ResponseText,
-            ReadStringAsCharset(LTempStream, FHTTP.Response.CharSet));
+          raise EIdHTTPProtocolException.CreateError(LResponseCode, Response.ResponseText,
+            ReadStringAsCharset(LTempStream, Response.CharSet));
         end;
       finally
         if LRaiseException or LDiscardContent then begin