Imported Upstream version 7.44.0
[platform/upstream/curl.git] / tests / data / test2033
1 <testcase>
2 <info>
3 <keywords>
4 HTTP
5 HTTP GET
6 HTTP Basic auth
7 HTTP NTLM auth
8 pipelining
9 </keywords>
10 </info>
11 # Server-side
12 <reply>
13
14 <!-- Basic auth -->
15 <data100>
16 HTTP/1.1 401 Need Basic or NTLM auth\r
17 Server: Microsoft-IIS/5.0\r
18 Content-Type: text/html; charset=iso-8859-1\r
19 Content-Length: 29\r
20 WWW-Authenticate: NTLM\r
21 WWW-Authenticate: Basic realm="testrealm"\r
22 \r
23 This is a bad password page!
24 </data100>
25
26 <!-- NTML auth -->
27 <data200>
28 HTTP/1.1 401 Need Basic or NTLM auth (2)\r
29 Server: Microsoft-IIS/5.0\r
30 Content-Type: text/html; charset=iso-8859-1\r
31 Content-Length: 27\r
32 WWW-Authenticate: NTLM\r
33 WWW-Authenticate: Basic realm="testrealm"\r
34 \r
35 This is not the real page!
36 </data200>
37
38 <data1201>
39 HTTP/1.1 401 NTLM intermediate (2)\r
40 Server: Microsoft-IIS/5.0\r
41 Content-Type: text/html; charset=iso-8859-1\r
42 Content-Length: 33\r
43 WWW-Authenticate: NTLM TlRMTVNTUAACAAAACAAIADAAAAAGggEAq6U1NAWaJCIAAAAAAAAAAAAAAAA4AAAATlRMTUF1dGg=\r
44 \r
45 This is still not the real page!
46 </data1201>
47
48 <data1202>
49 HTTP/1.1 200 Things are fine in server land\r
50 Server: Microsoft-IIS/5.0\r
51 Content-Type: text/html; charset=iso-8859-1\r
52 Content-Length: 32\r
53 \r
54 Finally, this is the real page!
55 </data1202>
56
57 <datacheck>
58 HTTP/1.1 401 Need Basic or NTLM auth\r
59 Server: Microsoft-IIS/5.0\r
60 Content-Type: text/html; charset=iso-8859-1\r
61 Content-Length: 29\r
62 WWW-Authenticate: NTLM\r
63 WWW-Authenticate: Basic realm="testrealm"\r
64 \r
65 This is a bad password page!
66 HTTP/1.1 401 Need Basic or NTLM auth\r
67 Server: Microsoft-IIS/5.0\r
68 Content-Type: text/html; charset=iso-8859-1\r
69 Content-Length: 29\r
70 WWW-Authenticate: NTLM\r
71 WWW-Authenticate: Basic realm="testrealm"\r
72 \r
73 This is a bad password page!
74 HTTP/1.1 401 NTLM intermediate (2)\r
75 Server: Microsoft-IIS/5.0\r
76 Content-Type: text/html; charset=iso-8859-1\r
77 Content-Length: 33\r
78 WWW-Authenticate: NTLM TlRMTVNTUAACAAAACAAIADAAAAAGggEAq6U1NAWaJCIAAAAAAAAAAAAAAAA4AAAATlRMTUF1dGg=\r
79 \r
80 HTTP/1.1 200 Things are fine in server land\r
81 Server: Microsoft-IIS/5.0\r
82 Content-Type: text/html; charset=iso-8859-1\r
83 Content-Length: 32\r
84 \r
85 Finally, this is the real page!
86 </datacheck>
87
88 </reply>
89
90 # Client-side
91 <client>
92 <features>
93 NTLM
94 !SSPI
95 </features>
96 <server>
97 http
98 </server>
99 <tool>
100 lib2033
101 </tool>
102
103  <name>
104 NTLM connection mapping, pipelining enabled
105  </name>
106  <setenv>
107 # we force our own host name, in order to make the test machine independent
108 CURL_GETHOSTNAME=curlhost
109 # we try to use the LD_PRELOAD hack, if not a debug build
110 LD_PRELOAD=%PWD/libtest/.libs/libhostname.so
111  </setenv>
112  <command>
113 http://%HOSTIP:%HTTPPORT/2032
114 </command>
115 <precheck>
116 chkhostname curlhost
117 </precheck>
118 </client>
119
120 # Verify data after the test has been "shot"
121 <verify>
122 <strip>
123 ^User-Agent:.*
124 </strip>
125 <protocol>
126 GET /20320100 HTTP/1.1\r
127 Host: 127.0.0.1:%HTTPPORT\r
128 Authorization: Basic dGVzdHVzZXI6dGVzdHBhc3M=\r
129 Accept: */*\r
130 \r
131 GET /20320100 HTTP/1.1\r
132 Host: 127.0.0.1:%HTTPPORT\r
133 Authorization: Basic dGVzdHVzZXI6dGVzdHBhc3M=\r
134 Accept: */*\r
135 \r
136 GET /20320200 HTTP/1.1\r
137 Host: 127.0.0.1:%HTTPPORT\r
138 Authorization: NTLM TlRMTVNTUAABAAAABoIIAAAAAAAAAAAAAAAAAAAAAAA=\r
139 Accept: */*\r
140 \r
141 GET /20320200 HTTP/1.1\r
142 Host: 127.0.0.1:%HTTPPORT\r
143 Authorization: NTLM TlRMTVNTUAADAAAAGAAYAEAAAAAYABgAWAAAAAAAAABwAAAACAAIAHAAAAAIAAgAeAAAAAAAAAAAAAAABoIBAI+/Fp9IERAQ74OsdNPbBpg7o8CVwLSO4DtFyIcZHUMKVktWIu92s2892OVpd2JzqnRlc3R1c2VyY3VybGhvc3Q=\r
144 Accept: */*\r
145 \r
146 </protocol>
147 </verify>
148 </testcase>