Skip to content

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

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

CURLOPT_ERRORBUFFER.3: Clarify it may not be written to on error#2190
jay wants to merge 1 commit intocurl:masterfrom
jay:fix_doc_ERRORBUFFER

Conversation

@jay
Copy link
Copy Markdown
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
Copy Markdown
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
Copy Markdown
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
Copy Markdown
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
Copy Markdown
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, we clear the buffer as
early as possible.

Bug #2190
@bagder
Copy link
Copy Markdown
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.

2 participants