cURL / Mailing Lists / curl-users / Single Mail

curl-users

Re: curl Content-Length through proxy

From: Fabian Keil <freebsd-listen_at_fabiankeil.de>
Date: Mon, 24 Jan 2011 18:13:53 +0100

Peter Sylvester <Peter.Sylvester_at_edelweb.fr> wrote:

> When using curl with a proxy and a POST, it seems that curl
> starts sending Content-length: 0 in order to detect somehow
> whether the proxy requires some authentication.
>
> Is there a way to avoid this, i.e. to send the real Content-Length
> immediately?

At least for me that seems to be the default:

fk@r500 ~ $curl -v -d foo=bar http://10.0.0.1/
* About to connect() to proxy 10.0.0.1 port 8118 (#0)
* Trying 10.0.0.1... connected
* Connected to 10.0.0.1 (10.0.0.1) port 8118 (#0)
> POST http://10.0.0.1/ HTTP/1.1
> User-Agent: curl/7.21.3 (amd64-portbld-freebsd9.0) libcurl/7.21.3 OpenSSL/0.9.8q zlib/1.2.5
> Host: 10.0.0.1
> Accept: */*
> Proxy-Connection: Keep-Alive
> Content-Length: 7
> Content-Type: application/x-www-form-urlencoded
>
[...]

Fabian

-------------------------------------------------------------------
List admin: http://cool.haxx.se/list/listinfo/curl-users
FAQ: http://curl.haxx.se/docs/faq.html
Etiquette: http://curl.haxx.se/mail/etiquette.html

Received on 2011-01-24