mirror of
https://github.com/curl/curl.git
synced 2026-07-23 14:57:19 +03:00
libcurl: reset rewind flag in curl_easy_reset()
curl_easy_reset() did not reset the `rewind_read` flag. This caused any handles that previously had a CURLE_SEND_FAIL_REWIND error to get stuck with that error, failing any subsequent requests, even if they didn't have any body at all. Verified in test 3034 Fixes #18206 Closes #18207
This commit is contained in:
parent
ab9dfebdae
commit
a93113b5b4
5 changed files with 120 additions and 2 deletions
|
|
@ -273,7 +273,7 @@ test3000 test3001 test3002 test3003 test3004 test3005 test3006 test3007 \
|
|||
test3008 test3009 test3010 test3011 test3012 test3013 test3014 test3015 \
|
||||
test3016 test3017 test3018 test3019 test3020 test3021 test3022 test3023 \
|
||||
test3024 test3025 test3026 test3027 test3028 test3029 test3030 test3031 \
|
||||
test3032 test3033 \
|
||||
test3032 test3033 test3034 \
|
||||
\
|
||||
test3100 test3101 test3102 test3103 test3104 test3105 \
|
||||
\
|
||||
|
|
|
|||
40
tests/data/test3034
Normal file
40
tests/data/test3034
Normal file
|
|
@ -0,0 +1,40 @@
|
|||
<testcase>
|
||||
<info>
|
||||
<keywords>
|
||||
CURLOPT_READFUNCTION
|
||||
curl_easy_reset
|
||||
rewind
|
||||
</keywords>
|
||||
</info>
|
||||
|
||||
# Server side
|
||||
<reply>
|
||||
<data nocheck="yes">
|
||||
HTTP/1.1 307 Temporary Redirect OK swsclose
|
||||
Content-Length: 0
|
||||
Location: /%TESTNUMBER
|
||||
</data>
|
||||
</reply>
|
||||
|
||||
# Client side
|
||||
<client>
|
||||
<server>
|
||||
http
|
||||
</server>
|
||||
<tool>
|
||||
lib%TESTNUMBER
|
||||
</tool>
|
||||
<name>
|
||||
Test reset resolves rewind failure
|
||||
</name>
|
||||
<command>
|
||||
http://%HOSTIP:%HTTPPORT/%TESTNUMBER
|
||||
</command>
|
||||
</client>
|
||||
|
||||
<verify>
|
||||
<errorcode>
|
||||
0
|
||||
</errorcode>
|
||||
</verify>
|
||||
</testcase>
|
||||
Loading…
Add table
Add a link
Reference in a new issue