Test 90 added: --anyauth that picks NTLM with a redirect and then another
[platform/upstream/curl.git] / tests / data / test90
1 # Server-side
2 <reply>
3
4 <data>
5 HTTP/1.1 401 Authorization Required swsclose\r
6 Server: Apache/1.3.27 (Darwin) PHP/4.1.2\r
7 WWW-Authenticate: Basic\r
8 WWW-Authenticate: Wild-and-crazy\r
9 WWW-Authenticate: NTLM\r
10 Content-Type: text/html; charset=iso-8859-1\r
11 \r
12 This is not the real page
13 </data>
14
15 # This is supposed to be returned when the server gets a first
16 # Authorization: NTLM line passed-in from the client
17 <data1001>
18 HTTP/1.1 401 Now gimme that second request of crap\r
19 Server: Microsoft-IIS/5.0\r
20 Content-Type: text/html; charset=iso-8859-1\r
21 Content-Length: 34\r
22 WWW-Authenticate: NTLM TlRMTVNTUAACAAAAAgACADAAAAAGgoEAc51AYVDgyNcAAAAAAAAAAG4AbgAyAAAAQ0MCAAQAQwBDAAEAEgBFAEwASQBTAEEAQgBFAFQASAAEABgAYwBjAC4AaQBjAGUAZABlAHYALgBuAHUAAwAsAGUAbABpAHMAYQBiAGUAdABoAC4AYwBjAC4AaQBjAGUAZABlAHYALgBuAHUAAAAAAA==\r
23 \r
24 This is not the real page either!
25 </data1001>
26
27 # This is supposed to be returned when the server gets the second
28 # Authorization: NTLM line passed-in from the client
29 <data1002>
30 HTTP/1.1 301 Things are fine in server land swsclose\r
31 Server: Microsoft-IIS/5.0\r
32 Connection: close\r
33 Location: /you/900010\r
34 \r
35 </data1002>
36
37 # This is the first reply after the redirection
38 <data10>
39 HTTP/1.1 401 Authorization Required swsclose\r
40 Server: Apache/1.3.27 (Darwin) PHP/4.1.2\r
41 WWW-Authenticate: Basic\r
42 WWW-Authenticate: Wild-and-crazy\r
43 WWW-Authenticate: NTLM\r
44 Content-Type: text/html; charset=iso-8859-1\r
45 \r
46 This is not the real page
47 </data10>
48
49 <data1011>
50 HTTP/1.1 401 Now gimme that second round of crap\r
51 Server: Microsoft-IIS/5.0\r
52 Content-Type: text/html; charset=iso-8859-1\r
53 Content-Length: 34\r
54 WWW-Authenticate: NTLM TlRMTVNTUAACAAAAAgACADAAAAAGgoEAc51AYVDgyNcAAAAAAAAAAG4AbgAyAAAAQ0MCAAQAQwBDAAEAEgBFAEwASQBTAEEAQgBFAFQASAAEABgAYwBjAC4AaQBjAGUAZABlAHYALgBuAHUAAwAsAGUAbABpAHMAYQBiAGUAdABoAC4AYwBjAC4AaQBjAGUAZABlAHYALgBuAHUAAAAAAA==\r
55 \r
56 This is not the real page either!
57 </data1011>
58
59 # This is supposed to be returned when the server gets the second
60 # Authorization: NTLM line passed-in from the client
61 <data1012>
62 HTTP/1.1 200 Things are fine in server land swsclose\r
63 Server: Microsoft-IIS/5.0\r
64 Content-Type: text/html; charset=iso-8859-1\r
65 \r
66 Finally, this is the real page!
67 </data1012>
68
69 <datacheck>
70 HTTP/1.1 401 Authorization Required swsclose\r
71 Server: Apache/1.3.27 (Darwin) PHP/4.1.2\r
72 WWW-Authenticate: Basic\r
73 WWW-Authenticate: Wild-and-crazy\r
74 WWW-Authenticate: NTLM\r
75 Content-Type: text/html; charset=iso-8859-1\r
76 \r
77 HTTP/1.1 401 Now gimme that second request of crap\r
78 Server: Microsoft-IIS/5.0\r
79 Content-Type: text/html; charset=iso-8859-1\r
80 Content-Length: 34\r
81 WWW-Authenticate: NTLM TlRMTVNTUAACAAAAAgACADAAAAAGgoEAc51AYVDgyNcAAAAAAAAAAG4AbgAyAAAAQ0MCAAQAQwBDAAEAEgBFAEwASQBTAEEAQgBFAFQASAAEABgAYwBjAC4AaQBjAGUAZABlAHYALgBuAHUAAwAsAGUAbABpAHMAYQBiAGUAdABoAC4AYwBjAC4AaQBjAGUAZABlAHYALgBuAHUAAAAAAA==\r
82 \r
83 HTTP/1.1 301 Things are fine in server land swsclose\r
84 Server: Microsoft-IIS/5.0\r
85 Connection: close\r
86 Location: /you/900010\r
87 \r
88 HTTP/1.1 401 Authorization Required swsclose\r
89 Server: Apache/1.3.27 (Darwin) PHP/4.1.2\r
90 WWW-Authenticate: Basic\r
91 WWW-Authenticate: Wild-and-crazy\r
92 WWW-Authenticate: NTLM\r
93 Content-Type: text/html; charset=iso-8859-1\r
94 \r
95 HTTP/1.1 401 Now gimme that second round of crap\r
96 Server: Microsoft-IIS/5.0\r
97 Content-Type: text/html; charset=iso-8859-1\r
98 Content-Length: 34\r
99 WWW-Authenticate: NTLM TlRMTVNTUAACAAAAAgACADAAAAAGgoEAc51AYVDgyNcAAAAAAAAAAG4AbgAyAAAAQ0MCAAQAQwBDAAEAEgBFAEwASQBTAEEAQgBFAFQASAAEABgAYwBjAC4AaQBjAGUAZABlAHYALgBuAHUAAwAsAGUAbABpAHMAYQBiAGUAdABoAC4AYwBjAC4AaQBjAGUAZABlAHYALgBuAHUAAAAAAA==\r
100 \r
101 HTTP/1.1 200 Things are fine in server land swsclose\r
102 Server: Microsoft-IIS/5.0\r
103 Content-Type: text/html; charset=iso-8859-1\r
104 \r
105 Finally, this is the real page!
106 </datacheck>
107
108 </reply>
109
110 # Client-side
111 <client>
112 # NTLM only works if SSL-support is present
113 <features>
114 SSL
115 </features>
116 <server>
117 http
118 </server>
119  <name>
120 HTTP with NTLM via --anyauth, and then follow-location with NTLM again
121  </name>
122  <command>
123 http://%HOSTIP:%HOSTPORT/90 -u testuser:testpass --anyauth -L
124 </command>
125 </test>
126
127 # Verify data after the test has been "shot"
128 <verify>
129 <strip>
130 ^User-Agent:.*
131 </strip>
132 <protocol>
133 GET /90 HTTP/1.1\r
134 Host: 127.0.0.1:8999\r
135 Pragma: no-cache\r
136 Accept: image/gif, image/x-xbitmap, image/jpeg, image/pjpeg, */*\r
137 \r
138 GET /90 HTTP/1.1\r
139 Authorization: NTLM TlRMTVNTUAABAAAAAgIAAAAAAAAgAAAAAAAAACAAAAA=\r
140 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
141 Host: 127.0.0.1:8999\r
142 Pragma: no-cache\r
143 Accept: image/gif, image/x-xbitmap, image/jpeg, image/pjpeg, */*\r
144 \r
145 GET /90 HTTP/1.1\r
146 Authorization: NTLM TlRMTVNTUAADAAAAGAAYAEgAAAAAAAAAYAAAAAAAAABAAAAACAAIAEAAAAAAAAAASAAAAAAAAABgAAAAAYIAAHRlc3R1c2VyWmRDApEJkUyGOPS3DjvASModEeW/N/FB\r
147 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
148 Host: 127.0.0.1:8999\r
149 Pragma: no-cache\r
150 Accept: image/gif, image/x-xbitmap, image/jpeg, image/pjpeg, */*\r
151 \r
152 GET /you/900010 HTTP/1.1\r
153 Host: 127.0.0.1:8999\r
154 Pragma: no-cache\r
155 Accept: image/gif, image/x-xbitmap, image/jpeg, image/pjpeg, */*\r
156 \r
157 GET /you/900010 HTTP/1.1\r
158 Authorization: NTLM TlRMTVNTUAABAAAAAgIAAAAAAAAgAAAAAAAAACAAAAA=\r
159 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
160 Host: 127.0.0.1:8999\r
161 Pragma: no-cache\r
162 Accept: image/gif, image/x-xbitmap, image/jpeg, image/pjpeg, */*\r
163 \r
164 GET /you/900010 HTTP/1.1\r
165 Authorization: NTLM TlRMTVNTUAADAAAAGAAYAEgAAAAAAAAAYAAAAAAAAABAAAAACAAIAEAAAAAAAAAASAAAAAAAAABgAAAAAYIAAHRlc3R1c2VyWmRDApEJkUyGOPS3DjvASModEeW/N/FB\r
166 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
167 Host: 127.0.0.1:8999\r
168 Pragma: no-cache\r
169 Accept: image/gif, image/x-xbitmap, image/jpeg, image/pjpeg, */*\r
170 \r
171 </protocol>
172 </verify>