1
0
mirror of https://github.com/moparisthebest/curl synced 2024-12-21 15:48:49 -05:00

Added test of IPv6 scope handling

This commit is contained in:
Dan Fandrich 2008-07-31 02:38:51 +00:00
parent fe1d024351
commit f3b4071209
2 changed files with 83 additions and 1 deletions

View File

@ -54,7 +54,8 @@ EXTRA_DIST = test1 test108 test117 test127 test20 test27 test34 test46 \
test556 test1031 test628 test629 test630 test631 test632 test1032 \
test1033 test539 test1034 test1035 test1036 test1037 test1038 test1039 \
test1040 test1041 test1042 test1043 test1044 test1045 test1046 test1047 \
test1048 test1049 test1050 test1051 test1052 test1053 test1054 test1055
test1048 test1049 test1050 test1051 test1052 test1053 test1054 test1055 \
test1056
filecheck:
@mkdir test-place; \

81
tests/data/test1056 Normal file
View File

@ -0,0 +1,81 @@
<testcase>
<info>
<keywords>
HTTP
HTTP GET
followlocation
IPv6
</keywords>
</info>
#
# Server-side
<reply>
<data>
HTTP/1.1 302 OK swsclose
Location: http://[::1%259999]:8994/moo/10560002
Date: Thu, 31 Jul 2008 14:49:00 GMT
Connection: close
</data>
<data2>
HTTP/1.1 200 OK swsclose
Date: Thu, 31 Jul 2008 14:49:00 GMT
Connection: close
body
</data2>
<datacheck>
HTTP/1.1 302 OK swsclose
Location: http://[::1%259999]:8994/moo/10560002
Date: Thu, 31 Jul 2008 14:49:00 GMT
Connection: close
HTTP/1.1 200 OK swsclose
Date: Thu, 31 Jul 2008 14:49:00 GMT
Connection: close
body
</datacheck>
</reply>
#
# Client-side
<client>
<features>
ipv6
</features>
<server>
http
http-ipv6
</server>
<name>
HTTP follow redirect from IPv4 to IPv6 with scope
</name>
<command>
http://%HOSTIP:%HTTPPORT/we/are/all/twits/1056 -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 ( '%HOST6IP' ne '[::1]' || '%HTTP6PORT' ne '8994' );"
</precheck>
</client>
#
# Verify data after the test has been "shot"
<verify>
<strip>
^User-Agent:.*
</strip>
<protocol>
GET /we/are/all/twits/1056 HTTP/1.1
Host: %HOSTIP:%HTTPPORT
Accept: */*
GET /moo/10560002 HTTP/1.1
Host: %HOST6IP:%HTTP6PORT
Accept: */*
</protocol>
</verify>
</testcase>