문제

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;
도움이 되었습니까?

해결책

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.

라이센스 : CC-BY-SA ~와 함께 속성
제휴하지 않습니다 StackOverflow
scroll top