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

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

Closed
wants to merge 1 commit into from

Conversation

jay
Copy link
Member

@jay 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

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

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

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.

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

@jay
Copy link
Member Author

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
Copy link
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
To offer applications a more defined behavior.

Bug #2190
bagder added a commit that referenced this pull request Mar 12, 2018
To offer applications a more defined behavior, we clear the buffer as
early as possible.

Bug #2190
@bagder
Copy link
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 fix_doc_ERRORBUFFER branch March 17, 2018 19:22
@lock lock bot locked as resolved and limited conversation to collaborators Jun 15, 2018
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Development

Successfully merging this pull request may close these issues.

None yet

2 participants