xref: /curl/tests/data/test1089 (revision 3fd80c7b)
1<testcase>
2<info>
3<keywords>
4HTTP
5HTTP GET
6followlocation
7--write-out
8</keywords>
9</info>
10
11#
12# Server-side
13<reply>
14<data nocheck="yes">
15HTTP/1.1 302 OK swsbounce swsclose
16Date: Tue, 09 Nov 2010 14:49:00 GMT
17Content-Length: 8
18Connection: close
19Content-Type: text/plain
20Location: ./%TESTNUMBER0001
21
22monster
23</data>
24<data1 nocheck="yes">
25HTTP/1.1 200 OK
26Date: Tue, 09 Nov 2010 14:49:00 GMT
27Content-Length: 15
28Connection: close
29Content-Type: text/plain; charset=us-ascii
30
31bigger monster
32</data1>
33
34</reply>
35
36#
37# Client-side
38<client>
39<server>
40http
41</server>
42<name>
43HTTP GET --write-out with redirected fetch
44</name>
45<command>
46http://%HOSTIP:%HTTPPORT/%TESTNUMBER -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<protocol>
54GET /%TESTNUMBER HTTP/1.1
55Host: %HOSTIP:%HTTPPORT
56User-Agent: curl/%VERSION
57Accept: */*
58
59GET /%TESTNUMBER0001 HTTP/1.1
60Host: %HOSTIP:%HTTPPORT
61User-Agent: curl/%VERSION
62Accept: */*
63
64</protocol>
65
66<stdout>
67HTTP/1.1 302 OK swsbounce swsclose
68Date: Tue, 09 Nov 2010 14:49:00 GMT
69Content-Length: 8
70Connection: close
71Content-Type: text/plain
72Location: ./%TESTNUMBER0001
73
74HTTP/1.1 200 OK
75Date: Tue, 09 Nov 2010 14:49:00 GMT
76Content-Length: 15
77Connection: close
78Content-Type: text/plain; charset=us-ascii
79
80bigger monster
812
821
8315
84http://%HOSTIP:%HTTPPORT/%TESTNUMBER0001
85text/plain; charset=us-ascii
86200
87</stdout>
88
89</verify>
90</testcase>
91