cURL / Mailing Lists / curl-library / Single Mail


Re: Content-Length header on CONNECT requests

From: Daniel Stenberg <>
Date: Tue, 26 Jun 2012 16:39:53 +0200 (CEST)

On Tue, 26 Jun 2012, Mark Aldred wrote:

> When using a proxy and issuing a request that contains a content-length
> header, lib-curl includes the content-length header in the CONNECT request
> (if a CONNECT is needed). Some proxies reject this with a 400 (Bad
> Request). I have seen it with Bluecoat. This seems like a bug in curl.
> Other than changing the curl code, how can I avoid this?

It is a bug, yes. We should make sure it doesn't send such headers!

The work-around for now would be to _not_ send content-length in custom
headers - that is usually a bad idea anyway.

Will you be able to provide a patch for this problem?

List admin:
Received on 2012-06-26