You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@commons.apache.org by Amila Maha Arachchi <am...@wso2.com> on 2010/11/23 13:18:33 UTC

Does httpcore supports the http CONNECT method?

Hi devs,

I would like to know whether http CONNECT method is supported in httpcore. I
went through the source of httpcore and httpcore-nio. But I was unable to
find out a responsible code for this.

CONNECT method is used in tunneling (which I am interested in). I have
studied about tunneling and I have understood the following facts (which I
believe is correct).

To create a tunnel, our http request should contain the following header,

CONNECT home.site.com:443 HTTP/1.0
User-agent: Mozilla/4.0
<<< empty line >>>

Then the proxy server tries to create a connection to the server:port
mentioned in the request. If it succeeds, following response is sent to the
client.

HTTP/1.0 200 Connection established
Proxy-agent: My-Proxy/1.1
<<< empty line >>>

After that, proxy server starts sending data via the tunnel (abstract idea).

Can somebody please tell me whether tunneling is supported or direct me to
the relevant code segment to look at.

Thanks in advance.

Amila.