Indy icon indicating copy to clipboard operation
Indy copied to clipboard

idHttp - IPv6 - IPVersion-ProtocolSwitch on Redirect (HandleRedirects=true)

Open tobfel opened this issue 3 months ago • 1 comments

First reqest is done via IPv6, but when the server response with 301, the RedirectUrl ist not called with the same IP-Protocol-Version. Can be fixed via:

if Request.IPVersion=Id_IPv6 then
    begin
    with TIdURI.Create(LLocation) do
         begin
         URI := LLocation;
         IPVersion := Id_IPv6;
         LLocation := URI;
         Free;
         end;
    end;

in

function TIdHTTPProtocol.ProcessResponse(AIgnoreReplies: array of Int16): TIdHTTPWhatsNext;
...
after:
LLocation := Response.Location;
LMethod := Request.Method;

tobfel avatar Mar 14 '24 18:03 tobfel