curl-library
Re: CURLOPT_HTTP_VERSION doesn't work?
Date: Wed, 7 Jan 2009 23:31:32 -0500
2009/1/7 Dan Fandrich <dan_at_coneharvesters.com>:
> The fundamental difference between this and a regular HTTP proxy is that
> a proxytunnel CONNECT is a completely separate operation from the HTTP
> request contained within the tunnel. Overloading the regular HTTP version
> number for this is doubling the meaning of CURLOPT_HTTP_VERSION. The
> CONNECT version number can/could/should have an independent version number
> to the contained request, in the same way that you can choose the SOCKS
> version number separately (with CURLOPT_PROXYTYPE) from the HTTP request
> carried over the SOCKS connection. In fact, you could compatibly create a
> new CURLOPT_PROXYTYPE enumerated type for this (although that may not be the
> cleanest place).
I was about to say that I couldn't think of any use cases where we
might want to specify the two versions separately, and as I was about
to craft an amazing reply itemizing the possibilities, I realized that
there is an obvious one: HTTP1.1 proxy, HTTP1.0 destination server.
The opposite case doesn't make much sense, as I am pretty sure a 1.0
compliant proxy won't forward 1.1 connections in any case, but we
might as well allow it to try :-)
I suspect the logic will be a lot simpler with a separate option,
CURLOPT_PROXY_HTTP_VERSION. Where else besides CONNECT do we
communicate with the proxy as a distinct entity from the destination
server? I suppose I will find out tomorrow...
-Craig
Received on 2009-01-08