cURL / Mailing Lists / curl-library / Single Mail

curl-library

Re: Content-Length header on CONNECT requests

From: Fabian Keil <freebsd-listen_at_fabiankeil.de>
Date: Wed, 27 Jun 2012 18:31:41 +0200

Daniel Stenberg <daniel_at_haxx.se> 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" https://www.example.org/

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

Fabian

-------------------------------------------------------------------
List admin: http://cool.haxx.se/list/listinfo/curl-library
Etiquette: http://curl.haxx.se/mail/etiquette.html

Received on 2012-06-27