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: Thu, 09 Nov 2010 14:49:00 GMT
17Content-Length: 8
18Connection: close
19Content-Type: text/plain
20Location: ./10890001
21
22monster
23</data>
24<data1 nocheck="yes">
25HTTP/1.1 200 OK
26Date: Thu, 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/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>
57GET /1089 HTTP/1.1
58Host: %HOSTIP:%HTTPPORT
59Accept: */*
60
61GET /10890001 HTTP/1.1
62Host: %HOSTIP:%HTTPPORT
63Accept: */*
64
65</protocol>
66
67<stdout>
68HTTP/1.1 302 OK swsbounce swsclose
69Date: Thu, 09 Nov 2010 14:49:00 GMT
70Content-Length: 8
71Connection: close
72Content-Type: text/plain
73Location: ./10890001
74
75HTTP/1.1 200 OK
76Date: Thu, 09 Nov 2010 14:49:00 GMT
77Content-Length: 15
78Connection: close
79Content-Type: text/plain; charset=us-ascii
80
81bigger monster
822
831
8415
85http://%HOSTIP:%HTTPPORT/10890001
86text/plain; charset=us-ascii
87200
88</stdout>
89
90</verify>
91</testcase>
92