• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
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<features>
85proxy
86</features>
87</client>
88
89#
90# Verify data after the test has been "shot"
91<verify>
92<strip>
93^User-Agent:.*
94</strip>
95<protocol>
96GET http://first.host.it.is/we/want/that/page/10881000 HTTP/1.1
97Host: first.host.it.is
98Accept: */*
99Proxy-Connection: Keep-Alive
100
101GET http://first.host.it.is/we/want/that/page/10881000 HTTP/1.1
102Host: first.host.it.is
103Authorization: Basic aWFtOm15c2VsZg==
104Accept: */*
105Proxy-Connection: Keep-Alive
106
107GET http://goto.second.host.now/10881002 HTTP/1.1
108Host: goto.second.host.now
109Authorization: Basic aWFtOm15c2VsZg==
110Accept: */*
111Proxy-Connection: Keep-Alive
112
113</protocol>
114</verify>
115</testcase>
116