curl_easy_reset does not reset status code #1017

Merged
merged 1 commit into from Sep 20, 2016

Projects

None yet

3 participants

@jeroen
jeroen commented Sep 20, 2016

Running curl_easy_reset() on a handle does not reset CURLINFO_RESPONSE_CODE and CURLINFO_FILETIME to their original value (0 and "1970-01-01 01:00:00 CET" respectively) as promised by documentation.

@jay
Member
jay commented Sep 16, 2016 edited

It looks like PureInfo is not reset in curl_easy_reset. It would probably be safer (and a little slower I bet) to just init a new handle and then copy over only what is documented. Anyway, tabling that for now, try this
edit: moved to https://github.com/curl/curl/compare/master...jay:fix_pureinfo_reset?expand=1

@jay jay added a commit to jay/curl that referenced this pull request Sep 17, 2016
@jay jay easy: Reset all statistical session info in curl_easy_reset
Bug: curl#1017
Reported-by: Jeroen Ooms
c4d8f06
@bagder
Member
bagder commented Sep 19, 2016

It'd be nice if we could repro this with a test and then verify the fix with it.

@jay jay easy: Reset all statistical session info in curl_easy_reset
Bug: curl#1017
Reported-by: Jeroen Ooms
22cfeac
@jay
Member
jay commented Sep 20, 2016

It'd be nice if we could repro this with a test and then verify the fix with it.

Done and I converted this to a PR. BTW I'm curious whether you receive notice when I do that.

@bagder
Member
bagder commented Sep 20, 2016

No I don't. I think we basically only get notified when there's a comment added which is also why we don't get notified when people for example push a new commit in an existing PR etc

@bagder
bagder approved these changes Sep 20, 2016 View changes

ship it! =)

@jay jay merged commit 22cfeac into curl:master Sep 20, 2016

2 checks passed

continuous-integration/appveyor/pr AppVeyor build succeeded
Details
continuous-integration/travis-ci/pr The Travis CI build passed
Details
@jay
Member
jay commented Sep 20, 2016

Thanks Jeroen, landed in 22cfeac.

@jay jay deleted the jay:fix_pureinfo_reset branch Sep 20, 2016
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment