curl / Mailing Lists / curl-library / Single Mail


Re: HTTP PATCH Content-Length

From: Daniel Stenberg via curl-library <>
Date: Thu, 1 Nov 2018 14:26:04 +0100 (CET)

On Thu, 1 Nov 2018, Kunal Ekawde via curl-library wrote:

> Im using libcurl http 1.1 and request goes via proxy (Istio), observation is
> that only incase of PATCH, the content length is set to 0.

I presume you're talking about Content-Length: in the request headers?

Can you show us how to reproduce this? Are you using a multi-pass
authentication perhaps?

> If application sets it, PATCH itself is not sent out.

I don't understand that is. If the applications sets what? The Content-Length:
header? That's generally not adviced and is very rarely the correct answer to

> For POST, by setting POSTFIELDSIZE it works, I tried this and INFILESIZE
> also for PATCH.

I don't understand this either. You wanted to send a PATCH request body
*without* setting POSTFIELDSIZE ? If so, how did you expect libcurl to figure
out the correct size?

Also, please tell us what curl version you're using.

Received on 2018-11-01