Re: Problem using idHttp and squid proxy

Giganews Newsgroups
Subject: Re: Problem using idHttp and squid proxy
Posted by:  Remy Lebeau \(Indy Team\) (re…
Date: Wed, 1 Sep 2010

"Samuel Soldat" <samuel.sold…> wrote in message

> I get the Exception:
> "Im Projekt Upload.exe ist eine Exception der Klasse
> EIdHTTPProtocolException mit der Meldung '' aufgetreten."

EIdHTTPProtocolException means that an error message was returned by either
the proxy server or the destination HTTP server.

> The real response text of the proxy is "403 forbidden".
> This is because IdHttp now use "CONNECT" instead of "GET".

That was an intentional change to address other proxy-related issues and
thus needs to remain intact.  Specifically, in earlier releases (such as the
one you were originally using), non-HTTPS requests would not get proxied
with CONNECT like they need to.  Now they do.  The correct way to use an
HTTP-based proxy is to send it a CONNECT request telling it which server to
connect to, and then any data afterwards (such as a GET request) gets passed
through to that server as-is.  This allows HTTPS requests to work correctly
through an HTTP proxy.

If that is causing new problems, then please provide a capture log from a
packet sniffer, such as Wireshark, along with your proxy Host/Port settings.
Assuming TIdHTTP is correctly connecting to Squid when sending CONNECT, and
not to the destination HTTP server directly, then it sounds like Squid is
not handling CONNECT correctly.

Remy Lebeau (TeamB)


In response to

Problem using idHttp and squid proxy posted by Samuel Soldat on Wed, 01 Sep 2010