curl/tests/data/test474
Daniel Stenberg 5603204448
curl: fix the -w urle.* variables
urle.scheme, urle.user, urle.password and urle.options mistakenly
operated on the original URL instead of the *effective* (last) URL.

Add test 474 to verify.

Reported-by: Gruber Glass
Fixes #14550
Closes #14560
2024-08-15 14:01:24 +02:00

53 lines
849 B
Plaintext

<testcase>
<info>
<keywords>
-w
--write-out
</keywords>
</info>
#
# Server-side
<reply>
<data crlf="yes" nocheck="yes">
HTTP/1.1 301 OK
Date: Tue, 09 Nov 2010 14:49:00 GMT
Content-Length: 0
Connection: close
Content-Type: text/html
Location: https://%HOSTIP:%HTTPSPORT/%TESTNUMBER0002
</data>
<data2 crlf="yes" nocheck="yes">
HTTP/1.1 200 OK
Date: Tue, 09 Nov 2010 14:49:00 GMT
Content-Length: 0
Connection: close
</data2>
</reply>
#
# Client-side
<client>
<server>
http
https
</server>
<name>
-w urle.scheme after HTTP to HTTPS redirect
</name>
<command option="no-include">
-k -L http://%HOSTIP:%HTTPPORT/%TESTNUMBER -w "%{num_redirects} %{url_effective} %{urle.scheme}\n"
</command>
</client>
#
# Verify data after the test has been "shot"
<verify>
<stdout>
1 https://%HOSTIP:%HTTPSPORT/%TESTNUMBER0002 https
</stdout>
</verify>
</testcase>