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