CURLOPT_POST with no CURLOPT_POSTFIELDS
Date: Wed, 4 Mar 2020 14:59:49 -0800
Dear Curlers,
I saw that the release notes for 7.69 included this --
http: mark POSTs with no body as "upload done" from the start
-- and wondered whether that fixed an issue I had noticed.
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.
It's not a huge deal as most of the time you'll be doing both. Also,
it doesn't occur in the command line tool as POST mode is enabled by
supplying some data, so the issue situation never arises.
thanks for listening
Jason_at_Spatial
-------------------------------------------------------------------
Unsubscribe: https://cool.haxx.se/list/listinfo/curl-library
Etiquette: https://curl.haxx.se/mail/etiquette.html
Received on 2020-03-05