Skip to content

Commit

Permalink
Fixes #510
Browse files Browse the repository at this point in the history
Fixing a compiler error in IdHTTP.pas
  • Loading branch information
rlebeau committed Nov 18, 2023
1 parent fc3966b commit b994412
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions Lib/Protocols/IdHTTP.pas
Original file line number Diff line number Diff line change
Expand Up @@ -880,7 +880,7 @@ function WWWFormUrlEncode(const ASrc: string; AByteEncoding: IIdTextEncoding
EnsureEncoding(AByteEncoding, encUTF8);
{$IFDEF STRING_IS_ANSI}
EnsureEncoding(ASrcEncoding, encOSDefault);
LChars := ASrcEncoding.GetChars(RawToBytes(ASrc[1], Length(ASrc)));
LChars := ASrcEncoding.GetChars(PByte(PAnsiChar(ASrc)), Length(ASrc));
{$ENDIF}

// 2 Chars to handle UTF-16 surrogates
Expand Down Expand Up @@ -3186,7 +3186,7 @@ procedure TIdCustomHTTP.DoRequest(const AMethod: TIdHTTPMethod;
Response.ResponseText := InternalReadLn;
FHTTPProto.RetrieveHeaders(MaxHeaderLines);
ProcessCookies(Request, Response);
if (Response.ResponseCode div 100) <> 1) or (Response.ResponseCode = 101) then begin
if ((Response.ResponseCode div 100) <> 1) or (Response.ResponseCode = 101) then begin
Break;
end;
Response.Clear;
Expand Down

0 comments on commit b994412

Please sign in to comment.