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.
Problem: I observe incomplete transmission of request bodies larger than about
40K bytes. Smaller requests are successful.
I set Content-{Type,Length} myself. I have tried the following two ways of
supplying the body to libcurl: 1) CURLOPT_POSTFIELDS with
CURLOPT_POSTFIELDSIZE, and 2) CURLOPT_READFUNCTION with CURLOPT_READDATA.
In case #1, tcpdump shows that libcurl only sends partial data. The remote
server acks each packet sent.
In case #2, my logs show that libcurl only invokes my read callback for some of
the data, usually no more than two 16 KiB buffers worth.
In both cases, the transfer eventually times out because the remote server does
not respond to the incomplete post.
Any pointers? Thanks in advance.
Regards,Sean-------------------------------------------------------------------
List admin: https://cool.haxx.se/list/listinfo/curl-library
Etiquette: https://curl.haxx.se/mail/etiquette.html