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