mirror of
https://github.com/moparisthebest/curl
synced 2024-12-21 23:58:49 -05:00
Added test309 to test HTTP redirect to HTTPS URL
This commit is contained in:
parent
9df37b93df
commit
0cae201044
3
CHANGES
3
CHANGES
@ -6,6 +6,9 @@
|
|||||||
|
|
||||||
Changelog
|
Changelog
|
||||||
|
|
||||||
|
Daniel Fandrich (19 Feb 2007)
|
||||||
|
- Added test309 to test HTTP redirect to HTTPS URL
|
||||||
|
|
||||||
Daniel S (18 Feb 2008)
|
Daniel S (18 Feb 2008)
|
||||||
- We're no longer providing a very old ca-bundle in the curl tarball. You can
|
- We're no longer providing a very old ca-bundle in the curl tarball. You can
|
||||||
get a fresh one downloaded and created with 'make ca-bundle' or you can get
|
get a fresh one downloaded and created with 'make ca-bundle' or you can get
|
||||||
|
@ -48,7 +48,7 @@ EXTRA_DIST = test1 test108 test117 test127 test20 test27 test34 test46 \
|
|||||||
test2000 test2001 test2002 test2003 test35 test544 test545 test2004 \
|
test2000 test2001 test2002 test2003 test35 test544 test545 test2004 \
|
||||||
test546 test1013 test1014 test1015 test547 test548 test549 test550 \
|
test546 test1013 test1014 test1015 test547 test548 test549 test550 \
|
||||||
test551 test552 test1016 test1017 test1018 test1019 test1020 test553 \
|
test551 test552 test1016 test1017 test1018 test1019 test1020 test553 \
|
||||||
test1021 test1022 test1023
|
test1021 test1022 test1023 test309
|
||||||
|
|
||||||
filecheck:
|
filecheck:
|
||||||
@mkdir test-place; \
|
@mkdir test-place; \
|
||||||
|
86
tests/data/test309
Normal file
86
tests/data/test309
Normal file
@ -0,0 +1,86 @@
|
|||||||
|
<testcase>
|
||||||
|
<info>
|
||||||
|
<keywords>
|
||||||
|
HTTP
|
||||||
|
HTTPS
|
||||||
|
HTTP GET
|
||||||
|
followlocation
|
||||||
|
</keywords>
|
||||||
|
</info>
|
||||||
|
|
||||||
|
# Server-side
|
||||||
|
<reply>
|
||||||
|
<data>
|
||||||
|
HTTP/1.1 301 This is a weirdo text message swsclose
|
||||||
|
Date: Thu, 09 Nov 2010 14:49:00 GMT
|
||||||
|
Server: test-server/fake
|
||||||
|
Location: https://127.0.0.1:8991/data/3090002.txt?coolsite=yes
|
||||||
|
Connection: close
|
||||||
|
|
||||||
|
This server reply is for testing a simple Location: following to HTTPS URL
|
||||||
|
|
||||||
|
</data>
|
||||||
|
<data2>
|
||||||
|
HTTP/1.1 200 Followed here fine swsclose
|
||||||
|
Date: Thu, 09 Nov 2010 14:49:00 GMT
|
||||||
|
Server: test-server/fake
|
||||||
|
Content-Length: 52
|
||||||
|
|
||||||
|
If this is received, the location following worked
|
||||||
|
|
||||||
|
</data2>
|
||||||
|
<datacheck>
|
||||||
|
HTTP/1.1 301 This is a weirdo text message swsclose
|
||||||
|
Date: Thu, 09 Nov 2010 14:49:00 GMT
|
||||||
|
Server: test-server/fake
|
||||||
|
Location: https://127.0.0.1:8991/data/3090002.txt?coolsite=yes
|
||||||
|
Connection: close
|
||||||
|
|
||||||
|
HTTP/1.1 200 Followed here fine swsclose
|
||||||
|
Date: Thu, 09 Nov 2010 14:49:00 GMT
|
||||||
|
Server: test-server/fake
|
||||||
|
Content-Length: 52
|
||||||
|
|
||||||
|
If this is received, the location following worked
|
||||||
|
|
||||||
|
</datacheck>
|
||||||
|
</reply>
|
||||||
|
|
||||||
|
# Client-side
|
||||||
|
<client>
|
||||||
|
<features>
|
||||||
|
SSL
|
||||||
|
</features>
|
||||||
|
<server>
|
||||||
|
http
|
||||||
|
https
|
||||||
|
</server>
|
||||||
|
<name>
|
||||||
|
HTTP Location: redirect to HTTPS URL
|
||||||
|
</name>
|
||||||
|
<command>
|
||||||
|
-k http://%HOSTIP:%HTTPPORT/want/309 -L
|
||||||
|
</command>
|
||||||
|
# The data section doesn't do variable substitution, so we must assert this
|
||||||
|
<precheck>
|
||||||
|
perl -e "print 'Test requires default test server host and port' if ( '%HOSTIP' ne '127.0.0.1' || '%HTTPSPORT' ne '8991' );"
|
||||||
|
</precheck>
|
||||||
|
</client>
|
||||||
|
|
||||||
|
# Verify data after the test has been "shot"
|
||||||
|
<verify>
|
||||||
|
<strip>
|
||||||
|
^User-Agent:.*
|
||||||
|
</strip>
|
||||||
|
<protocol>
|
||||||
|
GET /want/309 HTTP/1.1
|
||||||
|
Host: %HOSTIP:%HTTPPORT
|
||||||
|
Accept: */*
|
||||||
|
|
||||||
|
GET /data/3090002.txt?coolsite=yes HTTP/1.1
|
||||||
|
Host: %HOSTIP:%HTTPSPORT
|
||||||
|
Accept: */*
|
||||||
|
|
||||||
|
</protocol>
|
||||||
|
</verify>
|
||||||
|
</testcase>
|
Loading…
Reference in New Issue
Block a user