Bug 256071
| Summary: | [Curl] Use CURL_WRITEFUNC_ERROR when aborting CURLOPT_WRITEFUNCTION | ||
|---|---|---|---|
| Product: | WebKit | Reporter: | Kenji Shukuwa <kenji.shukuwa> |
| Component: | Platform | Assignee: | Nobody <webkit-unassigned> |
| Status: | RESOLVED FIXED | ||
| Severity: | Normal | CC: | commit-queue, fujii.hironori, webkit-bug-importer |
| Priority: | P2 | Keywords: | InRadar |
| Version: | WebKit Nightly Build | ||
| Hardware: | Unspecified | ||
| OS: | Unspecified | ||
| Bug Depends on: | 256079 | ||
| Bug Blocks: | |||
Kenji Shukuwa
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 | ||
|---|---|---|
| Add attachment proposed patch, testcase, etc. |
Kenji Shukuwa
Pull request: https://github.com/WebKit/WebKit/pull/13259
EWS
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
<rdar://problem/108641728>
WebKit Commit Bot
Re-opened since this is blocked by bug 256079
Kenji Shukuwa
Pull request: https://github.com/WebKit/WebKit/pull/13563
EWS
Committed 263783@main (46fe83c48439): <https://commits.webkit.org/263783@main>
Reviewed commits have been landed. Closing PR #13563 and removing active labels.