Imported Upstream version 7.53.1
[platform/upstream/curl.git] / tests / data / test2046
1 <testcase>
2 <info>
3 <keywords>
4 HTTP
5 HTTP GET
6 IDN
7 followlocation
8 --write-out
9 </keywords>
10 </info>
11
12 #
13 # Server-side
14 <reply>
15 <data nocheck="yes">
16 HTTP/1.1 302 OK swsbounce
17 Date: Thu, 09 Nov 2010 14:49:00 GMT
18 Content-Length: 9
19 Content-Type: text/plain
20 Location: ./20460001
21
22 redirect
23 </data>
24 <data1 nocheck="yes">
25 HTTP/1.1 200 OK
26 Date: Thu, 09 Nov 2010 14:49:00 GMT
27 Content-Length: 3
28 Content-Type: text/plain; charset=us-ascii
29
30 OK
31 </data1>
32 </reply>
33
34 #
35 # Client-side
36 <client>
37 <server>
38 http
39 </server>
40 <features>
41 idn
42 </features>
43 <setenv>
44 CHARSET=UTF-8
45 LANG=en_US.UTF-8
46 </setenv>
47  <name>
48 Connection re-use with IDN host name
49  </name>
50
51  <command>
52 http://åäö.se:%HTTPPORT/2046 --resolve xn--4cab6c.se:%HTTPPORT:%HOSTIP -w "%{num_connects}\n%{num_redirects}\n%{size_download}\n%{url_effective}\n%{content_type}\n%{response_code}\n" -L
53 </command>
54 </client>
55
56 #
57 # Verify data after the test has been "shot"
58 <verify>
59 <strip>
60 ^User-Agent:.*
61 </strip>
62 <protocol>
63 GET /2046 HTTP/1.1\r
64 Host: xn--4cab6c.se:%HTTPPORT\r
65 Accept: */*\r
66 \r
67 GET /20460001 HTTP/1.1\r
68 Host: xn--4cab6c.se:%HTTPPORT\r
69 Accept: */*\r
70 \r
71 </protocol>
72
73 <stdout>
74 HTTP/1.1 302 OK swsbounce
75 Date: Thu, 09 Nov 2010 14:49:00 GMT
76 Content-Length: 9
77 Content-Type: text/plain
78 Location: ./20460001
79
80 HTTP/1.1 200 OK
81 Date: Thu, 09 Nov 2010 14:49:00 GMT
82 Content-Length: 3
83 Content-Type: text/plain; charset=us-ascii
84
85 OK
86 1
87 1
88 3
89 http://åäö.se:%HTTPPORT/20460001
90 text/plain; charset=us-ascii
91 200
92 </stdout>
93
94 </verify>
95 </testcase>