09-14-2021, 07:33 PM
Hello,
1.
with the TIdHTTP i has problems on Rest- Server. Sends the Server on Bad Request (400, 404) the Client doesn’t received the ResponseContent.
I look and found a little workaround.
I advanced IdHttp.pas
Definition:
TIdCustomHTTP = class(TIdTCPClientCustom)
private
FRestMode: Boolean; //Add
procedure SetRestMode(AValue: Boolean); //Add
public
property RestMode: Boolean read FRestMode write SetRestMode; //Add
Implementation:
procedure TIdCustomHTTP.SetRestMode(AValue: Boolean); //Add
begin
if FRestMode=AValue then Exit;
FRestMode:=AValue;
if FRestMode then begin
HTTPOptions:= HTTPOptions + [hoNoProtocolErrorException];
end else begin
HTTPOptions:= HTTPOptions - [hoNoProtocolErrorException];
end;
end;
function TIdHTTPProtocol.ProcessResponse(AIgnoreReplies: array of Int16): TidHTTPWhatsNext;
else begin //From case
if not FHttp.FRestMode then begin //Add
CheckException;
Result := wnJustExit;
Exit;
end; //Add
end;
maybe that will help the users too
2.
I have seen, you're working on Indy OpenSSL 1.1.1, very nice, thanks.
My question. When will the new Indy library be added to the Lazarus library.
Thanks for support.
1.
with the TIdHTTP i has problems on Rest- Server. Sends the Server on Bad Request (400, 404) the Client doesn’t received the ResponseContent.
I look and found a little workaround.
I advanced IdHttp.pas
Definition:
TIdCustomHTTP = class(TIdTCPClientCustom)
private
FRestMode: Boolean; //Add
procedure SetRestMode(AValue: Boolean); //Add
public
property RestMode: Boolean read FRestMode write SetRestMode; //Add
Implementation:
procedure TIdCustomHTTP.SetRestMode(AValue: Boolean); //Add
begin
if FRestMode=AValue then Exit;
FRestMode:=AValue;
if FRestMode then begin
HTTPOptions:= HTTPOptions + [hoNoProtocolErrorException];
end else begin
HTTPOptions:= HTTPOptions - [hoNoProtocolErrorException];
end;
end;
function TIdHTTPProtocol.ProcessResponse(AIgnoreReplies: array of Int16): TidHTTPWhatsNext;
else begin //From case
if not FHttp.FRestMode then begin //Add
CheckException;
Result := wnJustExit;
Exit;
end; //Add
end;
maybe that will help the users too

2.
I have seen, you're working on Indy OpenSSL 1.1.1, very nice, thanks.
My question. When will the new Indy library be added to the Lazarus library.
Thanks for support.