Le 14 janv. 2014 à 11:31, Cédric Deltheil ced...@moodstocks.com a écrit :
Ah yes. Since PUT already works like that, I think it is a good reason for
us to make POST do the same!
Please find attached a tiny patch including a new test case (test1514).
HTTP-POST-patches.tar.gz
Description:
Le 13 janv. 2014 à 16:08, Daniel Stenberg dan...@haxx.se a écrit :
I compared what happens with an HTTP PUT request if the caller forgot to set
the expected size via `CURLOPT_INFILESIZE`: in that case, the Content-Length
header is omitted (and thus libcurl does not send any negative
Le 12 janv. 2014 à 22:20, Rich Gray rg...@plustechnologies.com a écrit :
Although it is probably the closest code for this error, CURLE_UPLOAD_FAILED
seems wrong. In my mind, it implies a wire error,
Just a precision: the corresponding error string is Upload failed (at
start/before it took
On Sun, 12 Jan 2014, Cédric Deltheil wrote:
I compared what happens with an HTTP PUT request if the caller forgot to set
the expected size via `CURLOPT_INFILESIZE`: in that case, the Content-Length
header is omitted (and thus libcurl does not send any negative
Content-Length).
Ah yes. Since
Le 12 janv. 2014 à 00:19, Daniel Stenberg dan...@haxx.se a écrit :
The question is: should we prevent libcurl to send the request by failing
early?
Yes I think so. Sending -1 is plain wrong.
After a quick code review I have several questions I would like to discuss:
I compared what
Daniel Stenberg wrote:
On Sat, 11 Jan 2014, Cédric Deltheil wrote:
When performing a standard HTTP POST (w/o chunked encoding) with a custom
read function, a common mistake is to forget to explicitly set the POST
size via `CURLOPT_POSTFIELDSIZE`.
This results in libcurl sending a negative
Hi all,
When performing a standard HTTP POST (w/o chunked encoding) with a custom
read function, a common mistake is to forget to explicitly set the POST size
via `CURLOPT_POSTFIELDSIZE`.
This results in libcurl sending a negative content length:
Content-Length: -1
, which gives a bad
On Sat, 11 Jan 2014, Cédric Deltheil wrote:
When performing a standard HTTP POST (w/o chunked encoding) with a custom
read function, a common mistake is to forget to explicitly set the POST size
via `CURLOPT_POSTFIELDSIZE`.
This results in libcurl sending a negative content length: