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