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