On Thu, Mar 5, 2020 at 7:28 AM Daniel Stenberg <dan...@haxx.se> wrote: > > On Wed, 4 Mar 2020, Jason Proctor via curl-library wrote: > > > The issue is that if you specify CURLOPT_POST but don't specify > > CURLOPT_POSTFIELDS, then the library sticks in sending mode and > > doesn't call the header or write callbacks, despite the fact that the > > server has happily sent a response. Setting CURLOPT_POSTFIELDS to the > > empty string results in the correct behaviour. > > That's not expected behavior nor does it match what existing libcurl tests > verify that works. For example in test 1514: > > https://github.com/curl/curl/blob/master/tests/libtest/lib1514.c > > Can you provide a test code that reproduces this? >
Looking at the test case I think the issue is that I set CURLOPT_POST and provide neither CURLOPT_POSTFIELDS nor a read function. If the API contract says I have to do one or the other, fair enough - but should Curl survive if I don't? Here's my code -- http://www.redfish.net/curl.c ------------------------------------------------------------------- Unsubscribe: https://cool.haxx.se/list/listinfo/curl-library Etiquette: https://curl.haxx.se/mail/etiquette.html