mirror of
https://github.com/curl/curl.git
synced 2026-08-07 19:32:56 +03:00
urldata: let the HTTP method be in the set.* struct
When the method is updated inside libcurl we must still not change the method as set by the user as then repeated transfers with that same handle might not execute the same operation anymore! This fixes the libcurl part of #5462 Test 1633 added to verify. Closes #5499
This commit is contained in:
parent
cba70628ae
commit
9c845be279
12 changed files with 154 additions and 60 deletions
|
|
@ -196,7 +196,7 @@ test1608 test1609 test1610 test1611 test1612 \
|
|||
\
|
||||
test1620 test1621 \
|
||||
\
|
||||
test1630 test1631 test1632 \
|
||||
test1630 test1631 test1632 test1633 \
|
||||
\
|
||||
test1650 test1651 test1652 test1653 test1654 test1655 \
|
||||
\
|
||||
|
|
|
|||
97
tests/data/test1633
Normal file
97
tests/data/test1633
Normal file
|
|
@ -0,0 +1,97 @@
|
|||
<testcase>
|
||||
<info>
|
||||
<keywords>
|
||||
HTTP
|
||||
HTTP GET
|
||||
</keywords>
|
||||
</info>
|
||||
|
||||
#
|
||||
# Server-side
|
||||
<reply>
|
||||
<data>
|
||||
HTTP/1.1 301 OK
|
||||
Accept-Ranges: bytes
|
||||
Content-Length: 0
|
||||
Connection: close
|
||||
Location: /16330002
|
||||
|
||||
</data>
|
||||
<data2>
|
||||
HTTP/1.1 429 too many requests
|
||||
Retry-After: 1
|
||||
Content-Length: 0
|
||||
Connection: close
|
||||
|
||||
</data2>
|
||||
|
||||
<datacheck>
|
||||
HTTP/1.1 301 OK
|
||||
Accept-Ranges: bytes
|
||||
Content-Length: 0
|
||||
Connection: close
|
||||
Location: /16330002
|
||||
|
||||
HTTP/1.1 429 too many requests
|
||||
Retry-After: 1
|
||||
Content-Length: 0
|
||||
Connection: close
|
||||
|
||||
HTTP/1.1 301 OK
|
||||
Accept-Ranges: bytes
|
||||
Content-Length: 0
|
||||
Connection: close
|
||||
Location: /16330002
|
||||
|
||||
HTTP/1.1 429 too many requests
|
||||
Retry-After: 1
|
||||
Content-Length: 0
|
||||
Connection: close
|
||||
|
||||
</datacheck>
|
||||
</reply>
|
||||
|
||||
#
|
||||
# Client-side
|
||||
<client>
|
||||
<server>
|
||||
http
|
||||
</server>
|
||||
<name>
|
||||
HTTP GET
|
||||
</name>
|
||||
<command>
|
||||
http://%HOSTIP:%HTTPPORT/1633 -d moo --retry 1 -L
|
||||
</command>
|
||||
</client>
|
||||
|
||||
#
|
||||
# Verify data after the test has been "shot"
|
||||
<verify>
|
||||
<strip>
|
||||
^User-Agent:.*
|
||||
</strip>
|
||||
<protocol>
|
||||
POST /1633 HTTP/1.1
|
||||
Host: %HOSTIP:%HTTPPORT
|
||||
Accept: */*
|
||||
Content-Length: 3
|
||||
Content-Type: application/x-www-form-urlencoded
|
||||
|
||||
mooGET /16330002 HTTP/1.1
|
||||
Host: %HOSTIP:%HTTPPORT
|
||||
Accept: */*
|
||||
|
||||
POST /1633 HTTP/1.1
|
||||
Host: %HOSTIP:%HTTPPORT
|
||||
Accept: */*
|
||||
Content-Length: 3
|
||||
Content-Type: application/x-www-form-urlencoded
|
||||
|
||||
mooGET /16330002 HTTP/1.1
|
||||
Host: %HOSTIP:%HTTPPORT
|
||||
Accept: */*
|
||||
|
||||
</protocol>
|
||||
</verify>
|
||||
</testcase>
|
||||
Loading…
Add table
Add a link
Reference in a new issue