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