• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
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<protocol>
54GET /1089 HTTP/1.1
55Host: %HOSTIP:%HTTPPORT
56User-Agent: curl/%VERSION
57Accept: */*
58
59GET /10890001 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: Thu, 09 Nov 2010 14:49:00 GMT
69Content-Length: 8
70Connection: close
71Content-Type: text/plain
72Location: ./10890001
73
74HTTP/1.1 200 OK
75Date: Thu, 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/10890001
85text/plain; charset=us-ascii
86200
87</stdout>
88
89</verify>
90</testcase>
91