RESOLVED FIXED 256071
[Curl] Use CURL_WRITEFUNC_ERROR when aborting CURLOPT_WRITEFUNCTION
https://bugs.webkit.org/show_bug.cgi?id=256071
Summary [Curl] Use CURL_WRITEFUNC_ERROR when aborting CURLOPT_WRITEFUNCTION
Kenji Shukuwa
Reported 2023-04-27 20:32:25 PDT
We are returning 0 when aborting CURLOPT_HEADERFUNCTION or CURLOPT_WRITEFUNCTION, which seems to be misuse in some cases. So use CURL_WRITEFUNC_ERROR which was added in 7.87.0 instead. https://github.com/curl/curl/pull/9874 --- Also, the inclination of some users has been to just return 0 to signal error, which is incorrect as that may be the number of bytes passed to the callback. --- https://curl.se/libcurl/c/CURLOPT_WRITEFUNCTION.html https://curl.se/libcurl/c/CURLOPT_HEADERFUNCTION.html --- You can also abort the transfer by returning CURL_WRITEFUNC_ERROR. (7.87.0) ---
Attachments
Kenji Shukuwa
Comment 1 2023-04-27 20:44:33 PDT
EWS
Comment 2 2023-04-27 20:52:21 PDT
Committed 263483@main (058484470283): <https://commits.webkit.org/263483@main> Reviewed commits have been landed. Closing PR #13259 and removing active labels.
Radar WebKit Bug Importer
Comment 3 2023-04-27 20:53:17 PDT
WebKit Commit Bot
Comment 4 2023-04-28 00:15:31 PDT
Re-opened since this is blocked by bug 256079
Kenji Shukuwa
Comment 5 2023-05-07 22:50:42 PDT
EWS
Comment 6 2023-05-07 22:56:37 PDT
Committed 263783@main (46fe83c48439): <https://commits.webkit.org/263783@main> Reviewed commits have been landed. Closing PR #13563 and removing active labels.
Note You need to log in before you can comment on or make changes to this bug.