Imported Upstream version 7.44.0
[platform/upstream/curl.git] / tests / data / test90
1 <testcase>
2 <info>
3 <keywords>
4 HTTP
5 HTTP GET
6 HTTP NTLM auth
7 --anyauth
8 followlocation
9 </keywords>
10 </info>
11 # Server-side
12 <reply>
13
14 <data>
15 HTTP/1.1 401 Authorization Required swsclose\r
16 Server: Apache/1.3.27 (Darwin) PHP/4.1.2\r
17 WWW-Authenticate: Basic\r
18 WWW-Authenticate: Wild-and-crazy\r
19 WWW-Authenticate: NTLM\r
20 Content-Type: text/html; charset=iso-8859-1\r
21 Content-Length: 26\r
22 \r
23 This is not the real page
24 </data>
25
26 # This is supposed to be returned when the server gets a first
27 # Authorization: NTLM line passed-in from the client
28 <data1001>
29 HTTP/1.1 401 Now gimme that second request of crap\r
30 Server: Microsoft-IIS/5.0\r
31 Content-Type: text/html; charset=iso-8859-1\r
32 Content-Length: 34\r
33 WWW-Authenticate: NTLM TlRMTVNTUAACAAAAAgACADAAAAAGgoEAc51AYVDgyNcAAAAAAAAAAG4AbgAyAAAAQ0MCAAQAQwBDAAEAEgBFAEwASQBTAEEAQgBFAFQASAAEABgAYwBjAC4AaQBjAGUAZABlAHYALgBuAHUAAwAsAGUAbABpAHMAYQBiAGUAdABoAC4AYwBjAC4AaQBjAGUAZABlAHYALgBuAHUAAAAAAA==\r
34 \r
35 This is not the real page either!
36 </data1001>
37
38 # This is supposed to be returned when the server gets the second
39 # Authorization: NTLM line passed-in from the client
40 <data1002>
41 HTTP/1.1 301 Things are fine in server land swsclose\r
42 Server: Microsoft-IIS/5.0\r
43 Connection: close\r
44 Location: /you/900010\r
45 \r
46 </data1002>
47
48 # This is the first reply after the redirection
49 <data10>
50 HTTP/1.1 401 Authorization Required swsclose\r
51 Server: Apache/1.3.27 (Darwin) PHP/4.1.2\r
52 WWW-Authenticate: Basic\r
53 WWW-Authenticate: Wild-and-crazy\r
54 WWW-Authenticate: NTLM\r
55 Content-Type: text/html; charset=iso-8859-1\r
56 Content-Length: 26\r
57 \r
58 This is not the real page
59 </data10>
60
61 <data1011>
62 HTTP/1.1 401 Now gimme that second round of crap\r
63 Server: Microsoft-IIS/5.0\r
64 Content-Type: text/html; charset=iso-8859-1\r
65 Content-Length: 34\r
66 WWW-Authenticate: NTLM TlRMTVNTUAACAAAAAgACADAAAAAGgoEAc51AYVDgyNcAAAAAAAAAAG4AbgAyAAAAQ0MCAAQAQwBDAAEAEgBFAEwASQBTAEEAQgBFAFQASAAEABgAYwBjAC4AaQBjAGUAZABlAHYALgBuAHUAAwAsAGUAbABpAHMAYQBiAGUAdABoAC4AYwBjAC4AaQBjAGUAZABlAHYALgBuAHUAAAAAAA==\r
67 \r
68 This is not the real page either!
69 </data1011>
70
71 # This is supposed to be returned when the server gets the second
72 # Authorization: NTLM line passed-in from the client
73 <data1012>
74 HTTP/1.1 200 Things are fine in server land swsclose\r
75 Server: Microsoft-IIS/5.0\r
76 Content-Type: text/html; charset=iso-8859-1\r
77 Content-Length: 32\r
78 \r
79 Finally, this is the real page!
80 </data1012>
81
82 <datacheck>
83 HTTP/1.1 401 Authorization Required swsclose\r
84 Server: Apache/1.3.27 (Darwin) PHP/4.1.2\r
85 WWW-Authenticate: Basic\r
86 WWW-Authenticate: Wild-and-crazy\r
87 WWW-Authenticate: NTLM\r
88 Content-Type: text/html; charset=iso-8859-1\r
89 Content-Length: 26\r
90 \r
91 HTTP/1.1 401 Now gimme that second request of crap\r
92 Server: Microsoft-IIS/5.0\r
93 Content-Type: text/html; charset=iso-8859-1\r
94 Content-Length: 34\r
95 WWW-Authenticate: NTLM TlRMTVNTUAACAAAAAgACADAAAAAGgoEAc51AYVDgyNcAAAAAAAAAAG4AbgAyAAAAQ0MCAAQAQwBDAAEAEgBFAEwASQBTAEEAQgBFAFQASAAEABgAYwBjAC4AaQBjAGUAZABlAHYALgBuAHUAAwAsAGUAbABpAHMAYQBiAGUAdABoAC4AYwBjAC4AaQBjAGUAZABlAHYALgBuAHUAAAAAAA==\r
96 \r
97 HTTP/1.1 301 Things are fine in server land swsclose\r
98 Server: Microsoft-IIS/5.0\r
99 Connection: close\r
100 Location: /you/900010\r
101 \r
102 HTTP/1.1 401 Authorization Required swsclose\r
103 Server: Apache/1.3.27 (Darwin) PHP/4.1.2\r
104 WWW-Authenticate: Basic\r
105 WWW-Authenticate: Wild-and-crazy\r
106 WWW-Authenticate: NTLM\r
107 Content-Type: text/html; charset=iso-8859-1\r
108 Content-Length: 26\r
109 \r
110 HTTP/1.1 401 Now gimme that second round of crap\r
111 Server: Microsoft-IIS/5.0\r
112 Content-Type: text/html; charset=iso-8859-1\r
113 Content-Length: 34\r
114 WWW-Authenticate: NTLM TlRMTVNTUAACAAAAAgACADAAAAAGgoEAc51AYVDgyNcAAAAAAAAAAG4AbgAyAAAAQ0MCAAQAQwBDAAEAEgBFAEwASQBTAEEAQgBFAFQASAAEABgAYwBjAC4AaQBjAGUAZABlAHYALgBuAHUAAwAsAGUAbABpAHMAYQBiAGUAdABoAC4AYwBjAC4AaQBjAGUAZABlAHYALgBuAHUAAAAAAA==\r
115 \r
116 HTTP/1.1 200 Things are fine in server land swsclose\r
117 Server: Microsoft-IIS/5.0\r
118 Content-Type: text/html; charset=iso-8859-1\r
119 Content-Length: 32\r
120 \r
121 Finally, this is the real page!
122 </datacheck>
123
124 </reply>
125
126 # Client-side
127 <client>
128 <features>
129 NTLM
130 !SSPI
131 debug
132 </features>
133 <server>
134 http
135 </server>
136  <name>
137 HTTP with NTLM via --anyauth, and then follow-location with NTLM again
138  </name>
139  <setenv>
140 # we force our own host name, in order to make the test machine independent
141 CURL_GETHOSTNAME=curlhost
142 # we try to use the LD_PRELOAD hack, if not a debug build
143 LD_PRELOAD=%PWD/libtest/.libs/libhostname.so
144  </setenv>
145  <command>
146 http://%HOSTIP:%HTTPPORT/90 -u testuser:testpass --anyauth -L
147 </command>
148 <precheck>
149 chkhostname curlhost
150 </precheck>
151 </client>
152
153 # Verify data after the test has been "shot"
154 <verify>
155 <strip>
156 ^User-Agent:.*
157 </strip>
158 <protocol>
159 GET /90 HTTP/1.1\r
160 Host: %HOSTIP:%HTTPPORT\r
161 Accept: */*\r
162 \r
163 GET /90 HTTP/1.1\r
164 Host: %HOSTIP:%HTTPPORT\r
165 Authorization: NTLM TlRMTVNTUAABAAAABoIIAAAAAAAAAAAAAAAAAAAAAAA=\r
166 User-Agent: curl/7.10.6-pre1 (i686-pc-linux-gnu) libcurl/7.10.6-pre1 OpenSSL/0.9.7a ipv6 zlib/1.1.3\r
167 Accept: */*\r
168 \r
169 GET /90 HTTP/1.1\r
170 Host: %HOSTIP:%HTTPPORT\r
171 Authorization: NTLM TlRMTVNTUAADAAAAGAAYAEAAAACeAJ4AWAAAAAAAAAD2AAAACAAIAPYAAAAIAAgA/gAAAAAAAAAAAAAABoKBAL9LNW5+nkyHZRmyFaL/LJ4xMjM0MjIzNGUCyhgQ9hw6eWAT13EbDa0BAQAAAAAAAACAPtXesZ0BMTIzNDIyMzQAAAAAAgAEAEMAQwABABIARQBMAEkAUwBBAEIARQBUAEgABAAYAGMAYwAuAGkAYwBlAGQAZQB2AC4AbgB1AAMALABlAGwAaQBzAGEAYgBlAHQAaAAuAGMAYwAuAGkAYwBlAGQAZQB2AC4AbgB1AAAAAAAAAAAAdGVzdHVzZXJjdXJsaG9zdA==\r
172 User-Agent: curl/7.10.6-pre1 (i686-pc-linux-gnu) libcurl/7.10.6-pre1 OpenSSL/0.9.7a ipv6 zlib/1.1.3\r
173 Accept: */*\r
174 \r
175 GET /you/900010 HTTP/1.1\r
176 Host: %HOSTIP:%HTTPPORT\r
177 Accept: */*\r
178 \r
179 GET /you/900010 HTTP/1.1\r
180 Host: %HOSTIP:%HTTPPORT\r
181 Authorization: NTLM TlRMTVNTUAABAAAABoIIAAAAAAAAAAAAAAAAAAAAAAA=\r
182 User-Agent: curl/7.10.8-pre1 (i686-pc-linux-gnu) libcurl/7.10.8-pre1 OpenSSL/0.9.7a ipv6 zlib/1.1.3 GSS\r
183 Accept: */*\r
184 \r
185 GET /you/900010 HTTP/1.1\r
186 Host: %HOSTIP:%HTTPPORT\r
187 Authorization: NTLM TlRMTVNTUAADAAAAGAAYAEAAAACeAJ4AWAAAAAAAAAD2AAAACAAIAPYAAAAIAAgA/gAAAAAAAAAAAAAABoKBALIBPdoGahtQQ8gQ7TJrKTYzMjM0NDIzNBFnpKw8B1BLcb456sVeozgBAQAAAAAAAACAPtXesZ0BMzIzNDQyMzQAAAAAAgAEAEMAQwABABIARQBMAEkAUwBBAEIARQBUAEgABAAYAGMAYwAuAGkAYwBlAGQAZQB2AC4AbgB1AAMALABlAGwAaQBzAGEAYgBlAHQAaAAuAGMAYwAuAGkAYwBlAGQAZQB2AC4AbgB1AAAAAAAAAAAAdGVzdHVzZXJjdXJsaG9zdA==\r
188 User-Agent: curl/7.10.8-pre1 (i686-pc-linux-gnu) libcurl/7.10.8-pre1 OpenSSL/0.9.7a ipv6 zlib/1.1.3 GSS\r
189 Accept: */*\r
190 \r
191 </protocol>
192 </verify>
193 </testcase>