From b3786f61dc53adba67dd489e404dc68a4b26575e Mon Sep 17 00:00:00 2001 From: Daniel Stenberg Date: Mon, 3 Jul 2017 23:52:10 +0200 Subject: url: make the original string get used on subsequent transfers ... since CURLOPT_URL should follow the same rules as other options: they remain set until changed or cleared. Added test 1551 to verify. Fixes #1631 Closes #1632 Reported-by: Pavel Rochnyak --- tests/data/test1551 | 72 +++++++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 72 insertions(+) create mode 100644 tests/data/test1551 (limited to 'tests/data/test1551') diff --git a/tests/data/test1551 b/tests/data/test1551 new file mode 100644 index 000000000..507266a85 --- /dev/null +++ b/tests/data/test1551 @@ -0,0 +1,72 @@ + + + +multi + + + +# Server-side + + +HTTP/1.1 302 OK +Date: Thu, 09 Nov 2010 14:49:00 GMT +Content-Length: 6 +Location: /15510002 + +-foo- + + +HTTP/1.1 200 OK +Date: Thu, 09 Nov 2010 14:49:00 GMT +Content-Length: 11 + +redirected + + +redirected +redirected + + + +# Client-side + + +http + +# tool is what to use instead of 'curl' + +lib1551 + + + +re-run redirected transfer without setting URL again + + +http://%HOSTIP:%HTTPPORT/1551 + + + + + +^User-Agent:.* + + +GET /1551 HTTP/1.1 +Host: %HOSTIP:%HTTPPORT +Accept: */* + +GET /15510002 HTTP/1.1 +Host: %HOSTIP:%HTTPPORT +Accept: */* + +GET /1551 HTTP/1.1 +Host: %HOSTIP:%HTTPPORT +Accept: */* + +GET /15510002 HTTP/1.1 +Host: %HOSTIP:%HTTPPORT +Accept: */* + + + + -- cgit v1.2.3