blob: 600f724156226b925b6e32def54474e03221bcf3 [file] [log] [blame]
xf.li6c8fc1e2023-08-12 00:11:09 -07001<testcase>
2<info>
3<keywords>
4HTTP
5HTTP GET
6IDN
7followlocation
8--resolve
9--write-out
10</keywords>
11</info>
12
13#
14# Server-side
15<reply>
16<data nocheck="yes">
17HTTP/1.1 302 OK swsbounce
18Date: Tue, 09 Nov 2010 14:49:00 GMT
19Content-Length: 9
20Content-Type: text/plain
21Location: http://åäö.se:%HTTPPORT/%TESTNUMBER0001
22
23redirect
24</data>
25<data1 nocheck="yes">
26HTTP/1.1 200 OK
27Date: Tue, 09 Nov 2010 14:49:00 GMT
28Content-Length: 3
29Content-Type: text/plain; charset=us-ascii
30
31OK
32</data1>
33</reply>
34
35#
36# Client-side
37<client>
38<server>
39http
40</server>
41<features>
42idn
43</features>
44<setenv>
45LC_ALL=en_US.UTF-8
46LC_CTYPE=en_US.UTF-8
47</setenv>
48<precheck>
49perl -MI18N::Langinfo=langinfo,CODESET -e 'die "Needs a UTF-8 locale" if (lc(langinfo(CODESET())) ne "utf-8");'
50</precheck>
51 <name>
52Redirect following to UTF-8 IDN host name
53 </name>
54
55 <command>
56http://åäö.se:%HTTPPORT/%TESTNUMBER --resolve xn--4cab6c.se:%HTTPPORT:%HOSTIP -L --connect-to %HOSTIP:%HTTPPORT:%HOSTIP:%HTTPPORT
57</command>
58</client>
59
60#
61# Verify data after the test has been "shot"
62<verify>
63<protocol>
64GET /%TESTNUMBER HTTP/1.1
65Host: xn--4cab6c.se:%HTTPPORT
66User-Agent: curl/%VERSION
67Accept: */*
68
69GET /%TESTNUMBER0001 HTTP/1.1
70Host: xn--4cab6c.se:%HTTPPORT
71User-Agent: curl/%VERSION
72Accept: */*
73
74</protocol>
75
76<stdout>
77HTTP/1.1 302 OK swsbounce
78Date: Tue, 09 Nov 2010 14:49:00 GMT
79Content-Length: 9
80Content-Type: text/plain
81Location: http://åäö.se:%HTTPPORT/%TESTNUMBER0001
82
83HTTP/1.1 200 OK
84Date: Tue, 09 Nov 2010 14:49:00 GMT
85Content-Length: 3
86Content-Type: text/plain; charset=us-ascii
87
88OK
89</stdout>
90
91</verify>
92</testcase>