Question

How can I read all the full target URL's in IdHTTPProxyServer? The following code only works HTTP urls. For HTTPS it will only return Server:443 instead of a full URL.

procedure TManager.OnHTTPBeforeCommand(AContext: TIdHTTPProxyServerContext);
var
  URL:String;
begin
  URL := AContext.Target;
end;
Était-ce utile?

La solution

HTTPS proxying utilizes the HTTP CONNECT verb, which does not connect to a URL, only a host:port. The web client CONNECTs to the target server first to establish a base connection, then establishes an SSL session with that server before then sending the actual HTTP request to it. Since the request is encrypted, there is no way for TIdHTTPProxyServer to capture the full HTTPS URL.

Licencié sous: CC-BY-SA avec attribution
Non affilié à StackOverflow
scroll top