The block of code specifying the content-length header appears to have been copied from the drupal_http_request function. I don't think this block of code is necessary in chr because curl should add that header to the request automatically if it is needed (POST/PUT).

For me our proxy (mcafee web gateway) wouldn't accept requests over https unless I removed this header.

Patch attached.

Comments

minoroffense’s picture

With the patch applied do the content length headers get added when required?

minoroffense’s picture

Version: 7.x-1.x-dev » 6.x-1.x-dev
Status: Needs review » Patch (to be ported)
minoroffense’s picture

Version: 6.x-1.x-dev » 8.x-1.x-dev
Priority: Normal » Minor