curl-w32/tests/data/test1056

86 lines
1.6 KiB
Plaintext
Raw Normal View History

<testcase>
<info>
<keywords>
HTTP
HTTP GET
followlocation
IPv6
</keywords>
</info>
#
# Server-side
<reply>
<data>
HTTP/1.1 302 OK swsclose
Location: http://[::1%259999]:%HTTP6PORT/moo/%TESTNUMBER0002
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]:%HTTP6PORT/moo/%TESTNUMBER0002
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>
# This test relies on the IPv6 scope field being ignored when connecting to
# ipv6-localhost (i.e. [::1%259999] is treated as [::1]). Maybe this is a bit
# dodgy, but it happens on all our test platforms but Windows so skip this
# test there. This feature doesn't work on msys or Cygwin, so use a precheck
# to skip those.
<features>
ipv6
!win32
</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/%TESTNUMBER -L
</command>
<precheck>
perl -e "print 'Test is not supported on the Windows kernel' if ($^O eq 'MSWin32' || $^O eq 'msys' || $^O eq 'cygwin');"
</precheck>
</client>
#
# Verify data after the test has been "shot"
<verify>
<protocol>
GET /we/are/all/twits/%TESTNUMBER HTTP/1.1
Host: %HOSTIP:%HTTPPORT
User-Agent: curl/%VERSION
Accept: */*
GET /moo/%TESTNUMBER0002 HTTP/1.1
Host: %HOST6IP:%HTTP6PORT
User-Agent: curl/%VERSION
Accept: */*
</protocol>
</verify>
</testcase>