Skip to content

lib: add CURL_WRITEFUNC_ERROR to signal write callback error#9874

Closed
jay wants to merge 1 commit intocurl:masterfrom
jay:CURL_WRITEFUNC_ERROR
Closed

lib: add CURL_WRITEFUNC_ERROR to signal write callback error#9874
jay wants to merge 1 commit intocurl:masterfrom
jay:CURL_WRITEFUNC_ERROR

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
Copy link
Member

@bagder bagder left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

A good idea!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Development

Successfully merging this pull request may close these issues.

2 participants