cURL / Mailing Lists / curl-library / Single Mail


Re: Content-Length header on CONNECT requests

From: Fabian Keil <>
Date: Wed, 27 Jun 2012 18:31:41 +0200

Daniel Stenberg <> wrote:

> On Tue, 26 Jun 2012, Mark Aldred wrote:
> > Here is the fix based on 7.25.0. Don't include any custom headers
> > with a CONNECT request.
> Yeah, that is tempting as adding them there certainly mostly add
> problems.
> However, for example test 287 uses (and verifies) a user-agent there and
> such a header does make some sense even in a CONNECT.
> Thoughts? (Question open to everyone!)

I like the behaviour tested in 287 useful and would miss not being
able to send custom HTTP headers in CONNECT requests with curl.

I wouldn't mind if I had to use a separate option for this,
though. In fact I would consider this an improvement, as it
would allow something like:

curl --header "Bla: fasel" --connect-header "Foo: bar"

(Letting the proxy only see the header Foo, while only
sees the header Bla.)


List admin:

Received on 2012-06-27