Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

lib: add CURL_WRITEFUNC_ERROR to signal write callback error #9874

Closed
wants to merge 1 commit into from

Conversation

jay
Copy link
Member

@jay jay commented Nov 8, 2022

Prior to this change if the user wanted to signal an error from their write callbacks they would have to use logic to return a value different from the number of bytes (nmemb) passed to the callback. 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.

To remedy this the user can now return CURL_WRITEFUNC_ERROR instead.

Ref: #9873

Closes #xxxx

Prior to this change if the user wanted to signal an error from their
write callbacks they would have to use logic to return a value different
from the number of bytes (nmemb) passed to the callback. 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.

To remedy this the user can now return CURL_WRITEFUNC_ERROR instead.

Ref: curl#9873

Closes #xxxx
@jay jay added the libcurl API label Nov 8, 2022
bagder
bagder approved these changes Nov 9, 2022
Copy link
Member

@bagder bagder left a comment

A good idea!

@jay jay closed this in 6d75115 Nov 10, 2022
@jay jay deleted the CURL_WRITEFUNC_ERROR branch Nov 10, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants