curl / Mailing Lists / curl-library / Single Mail

curl-library

Re: Obscure internal select() problem on Win32/Visual Studio 2015 (cmake) build

From: Daniel Stenberg <daniel_at_haxx.se>
Date: Tue, 1 Aug 2017 00:56:58 +0200 (CEST)

On Mon, 31 Jul 2017, David Weisgerber wrote:

> However, if I do a POST with CURL_HTTPPOST and CURLFORM_* (curl_formadd) for
> uploading a file (like you can see in the wireshark protocol), there seems
> to happen the following: If there is the rare case, that the headers until
> the raw data of the file to be uploaded have exactly the same size as the
> previous POST where CURLOPT_POSTFIELDSIZE is set to, curl will stop sending
> data. curl will not use my sendfunction and callback and just stop. The
> transfer will end when the Tomcat server says "Bad Request" after 20s.
>
> I would consider this a bug on the curl side because it should not use the
> information in CURLOPT_POSTFIELDSIZE this way when doing a
> multipart/form-data upload. (Or maybe it should not use the information
> anyway). But it was of course also a misuse of the option. I now set it back
> to -1 before doing the multipart/form-data POST with curl and it seems to
> work correctly.

Given this description I think I would agree, it does some like a bug. Can you
help us write up a test snippet that reproduces this issue? We could use it
to fix the problem and build a test case out of it...

-- 
  / daniel.haxx.se
-------------------------------------------------------------------
Unsubscribe: https://cool.haxx.se/list/listinfo/curl-library
Etiquette:   https://curl.haxx.se/mail/etiquette.html
Received on 2017-08-01