cURL / Mailing Lists / curl-library / Single Mail

curl-library

Re: Incomplete HTTP post body

From: Sean Miller via curl-library <curl-library_at_cool.haxx.se>
Date: Fri, 5 Aug 2016 00:29:55 +0000 (UTC)

Thanks for your advice.
I cannot control which version of libcurl is deployed on these hosts. I can, however, statically compile curl-7_50_1. So I did.
For a large request (>64 KiB) with a timeout of 5 sec, I see libcurl requesting up to 4 buffers worth of data from my READFUNC, with one call to TIMERFUNC with timeout_ms=198. After the 4th chunk, libcurl calls TIMERFUNC with timeout_ms=4800, which consumes all the remaining time until the timeout. I don't understand why libcurl wants to wait so long when I haven't told it that I'm done providing data.
If you can intuit from this what my mistake might have been, I'd immensely appreciate that.
In the meantime, I'm going to try to pare down my code to a minimal reproducible example...
Regards,Sean M.

    On Thursday, August 4, 2016 12:24 AM, Daniel Stenberg <daniel_at_haxx.se> wrote:
 

 On Wed, 3 Aug 2016, Sean Miller via curl-library wrote:

> I'm using libcurl-7.19.7 to post JSON to an HTTP server. I'm aware this is
> an old version. I'm using the multi interface, and I based my implementation
> on the example given in asiohiper.cpp. I worked around bug #62.

We fixed known bug #62 in 7.21.2 with a commit merged nearly 6 years ago...

> Problem: I observe incomplete transmission of request bodies larger than
> about 40K bytes. Smaller requests are successful.

I can't recall any particular bug that would show up like that. I supposes it
would depend on exactly what more happens on that transation. Chances are also
that I've just forgotten about some old flaw.

But why bother? You're probably suffering from a bug in libcurl so if you want
that fixed you need to patch your libcurl and rebuild, and if you can do that
surely you're better off just considering upgrading instead and save yourself
a lot of troubles and quite likely fix a few other bugs at the same time that
are waiting to strike down on you soon...

If you're looking for the minimal patch to fix only this problem, then I'd
recommend "git bisect" to find the fix that made the problem go away and then
you backport that one to your version.

-- 
  / daniel.haxx.se
  

-------------------------------------------------------------------
List admin: https://cool.haxx.se/list/listinfo/curl-library
Etiquette: https://curl.haxx.se/mail/etiquette.html
Received on 2016-08-05