From 9c845be2797e2047547ec247cb037471aeb48bb0 Mon Sep 17 00:00:00 2001 From: Daniel Stenberg Date: Mon, 1 Jun 2020 22:58:46 +0200 Subject: 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 --- tests/data/Makefile.inc | 2 +- tests/data/test1633 | 97 +++++++++++++++++++++++++++++++++++++++++++++++++ 2 files changed, 98 insertions(+), 1 deletion(-) create mode 100644 tests/data/test1633 (limited to 'tests/data') diff --git a/tests/data/Makefile.inc b/tests/data/Makefile.inc index 0633ccb2f..7a048f01a 100644 --- a/tests/data/Makefile.inc +++ b/tests/data/Makefile.inc @@ -196,7 +196,7 @@ test1608 test1609 test1610 test1611 test1612 \ \ test1620 test1621 \ \ -test1630 test1631 test1632 \ +test1630 test1631 test1632 test1633 \ \ test1650 test1651 test1652 test1653 test1654 test1655 \ \ diff --git a/tests/data/test1633 b/tests/data/test1633 new file mode 100644 index 000000000..5d29ef139 --- /dev/null +++ b/tests/data/test1633 @@ -0,0 +1,97 @@ + + + +HTTP +HTTP GET + + + +# +# Server-side + + +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 + +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 + + + + +# +# Client-side + + +http + + +HTTP GET + + +http://%HOSTIP:%HTTPPORT/1633 -d moo --retry 1 -L + + + +# +# Verify data after the test has been "shot" + + +^User-Agent:.* + + +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: */* + + + + -- cgit v1.2.3