CURLOPT_ERRORBUFFER.3: Clarify it may not be written to on error #2190

Closed
wants to merge 1 commit into
from

Conversation

Projects
None yet
2 participants
@jay
Member

jay commented Dec 23, 2017

  • Advise the user to set the error buffer to an empty string before each
    request.

Bug: https://curl.haxx.se/mail/lib-2017-12/0068.html
Reported-by: Martin Galvan

CURLOPT_ERRORBUFFER.3: Clarify it may not be written to on error
- Advise the user to set the error buffer to an empty string before each
  request.

Bug: https://curl.haxx.se/mail/lib-2017-12/0068.html
Reported-by: Martin Galvan

@jay jay added the documentation label Dec 23, 2017

@jay

This comment has been minimized.

Show comment Hide comment
@jay

jay Dec 23, 2017

Member

alternately we could change this in the library to zero it out before each request, but I'm concerned we may miss some error code since errors can happen anywhere

Member

jay commented Dec 23, 2017

alternately we could change this in the library to zero it out before each request, but I'm concerned we may miss some error code since errors can happen anywhere

@bagder

bagder approved these changes Jan 15, 2018

I think this improves the documentation of how it currently works.

@jay

This comment has been minimized.

Show comment Hide comment
@jay

jay Jan 17, 2018

Member

I'm going to back away from the It's advised to set the error buffer to an empty string before each request.. Instead I think it seems practical that the library would zero it for the user on perform.

Member

jay commented Jan 17, 2018

I'm going to back away from the It's advised to set the error buffer to an empty string before each request.. Instead I think it seems practical that the library would zero it for the user on perform.

@bagder

This comment has been minimized.

Show comment Hide comment
@bagder

bagder Jan 17, 2018

Member

@jay: that will indeed be the most user-friendly approach!

Member

bagder commented Jan 17, 2018

@jay: that will indeed be the most user-friendly approach!

bagder added a commit that referenced this pull request Mar 12, 2018

curl_multi_add_handle: clear errorbuffer if set
To offer applications a more defined behavior.

Bug #2190

bagder added a commit that referenced this pull request Mar 12, 2018

curl_multi_add_handle/easy_perform: clear errorbuffer if set
To offer applications a more defined behavior, we clear the buffer as
early as possible.

Bug #2190
@bagder

This comment has been minimized.

Show comment Hide comment
@bagder

bagder Mar 12, 2018

Member

See #2377 for a take at making it cleared early on.

Member

bagder commented Mar 12, 2018

See #2377 for a take at making it cleared early on.

@bagder bagder closed this in fb4f568 Mar 17, 2018

@jay jay deleted the jay:fix_doc_ERRORBUFFER branch Mar 17, 2018

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