curl/tests/data/test474
Viktor Szakats c6bd2e6a9a
tests: prefer --insecure over -k
To make it uniform in all tests, and greppability.

Also:
- replace `-k` flag with `-q` in test 1268. (the actual flag doesn't
  matter in this test)
- keep `-k` in test 300 to test its short form.
  (also verified to fail without a working `-k`)

Closes #16878
2025-04-03 23:18:55 +02:00

53 lines
857 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">
--insecure -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>