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