• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1<testcase>
2<info>
3<keywords>
4HTTP
5HTTP proxy
6HTTP Basic auth
7HTTP proxy Basic auth
8followlocation
9</keywords>
10</info>
11#
12# Server-side
13<reply>
14<data>
15HTTP/1.1 302 OK
16Date: Thu, 09 Nov 2010 14:49:00 GMT
17Server: test-server/fake swsclose
18Content-Type: text/html
19Funny-head: yesyes
20Location: http://goto.second.host.now/2330002
21Content-Length: 8
22Connection: close
23
24contents
25</data>
26<data2>
27HTTP/1.1 200 OK
28Date: Thu, 09 Nov 2010 14:49:00 GMT
29Server: test-server/fake swsclose
30Content-Type: text/html
31Funny-head: yesyes
32Content-Length: 9
33
34contents
35</data2>
36
37<datacheck>
38HTTP/1.1 302 OK
39Date: Thu, 09 Nov 2010 14:49:00 GMT
40Server: test-server/fake swsclose
41Content-Type: text/html
42Funny-head: yesyes
43Location: http://goto.second.host.now/2330002
44Content-Length: 8
45Connection: close
46
47HTTP/1.1 200 OK
48Date: Thu, 09 Nov 2010 14:49:00 GMT
49Server: test-server/fake swsclose
50Content-Type: text/html
51Funny-head: yesyes
52Content-Length: 9
53
54contents
55</datacheck>
56</reply>
57
58#
59# Client-side
60<client>
61<server>
62http
63</server>
64 <name>
65HTTP, proxy, site+proxy auth and Location: to new host
66 </name>
67 <command>
68http://first.host.it.is/we/want/that/page/233 -x %HOSTIP:%HTTPPORT --user iam:myself --proxy-user testing:this --location
69</command>
70</client>
71
72#
73# Verify data after the test has been "shot"
74<verify>
75<strip>
76^User-Agent:.*
77</strip>
78<protocol>
79GET http://first.host.it.is/we/want/that/page/233 HTTP/1.1
80Host: first.host.it.is
81Proxy-Authorization: Basic dGVzdGluZzp0aGlz
82Authorization: Basic aWFtOm15c2VsZg==
83Accept: */*
84Proxy-Connection: Keep-Alive
85
86GET http://goto.second.host.now/2330002 HTTP/1.1
87Host: goto.second.host.now
88Proxy-Authorization: Basic dGVzdGluZzp0aGlz
89Accept: */*
90Proxy-Connection: Keep-Alive
91
92</protocol>
93</verify>
94</testcase>
95