Imported Upstream version 7.44.0
[platform/upstream/curl.git] / tests / data / test159
1 <testcase>
2 <info>
3 <keywords>
4 HTTP
5 HTTP GET
6 HTTP NTLM auth
7 </keywords>
8 </info>
9
10 # Server-side
11 <reply>
12
13 <!-- no <data> in this test since we have NTLM from the start
14
15 This is supposed to be returned when the server gets a first
16 Authorization: NTLM line passed-in from the client -->
17
18 <data1001>
19 HTTP/1.1 401 Now gimme that second request of crap\r
20 Server: Microsoft-IIS/5.0\r
21 Content-Type: text/html; charset=iso-8859-1\r
22 Content-Length: 34\r
23 WWW-Authenticate: NTLM TlRMTVNTUAACAAAAAgACADAAAAAGgoEAc51AYVDgyNcAAAAAAAAAAG4AbgAyAAAAQ0MCAAQAQwBDAAEAEgBFAEwASQBTAEEAQgBFAFQASAAEABgAYwBjAC4AaQBjAGUAZABlAHYALgBuAHUAAwAsAGUAbABpAHMAYQBiAGUAdABoAC4AYwBjAC4AaQBjAGUAZABlAHYALgBuAHUAAAAAAA==\r
24 Connection: close\r
25 \r
26 This is not the real page either!
27 </data1001>
28
29 <datacheck>
30 HTTP/1.1 401 Now gimme that second request of crap\r
31 Server: Microsoft-IIS/5.0\r
32 Content-Type: text/html; charset=iso-8859-1\r
33 Content-Length: 34\r
34 WWW-Authenticate: NTLM TlRMTVNTUAACAAAAAgACADAAAAAGgoEAc51AYVDgyNcAAAAAAAAAAG4AbgAyAAAAQ0MCAAQAQwBDAAEAEgBFAEwASQBTAEEAQgBFAFQASAAEABgAYwBjAC4AaQBjAGUAZABlAHYALgBuAHUAAwAsAGUAbABpAHMAYQBiAGUAdABoAC4AYwBjAC4AaQBjAGUAZABlAHYALgBuAHUAAAAAAA==\r
35 Connection: close\r
36 \r
37 This is not the real page either!
38 </datacheck>
39
40 </reply>
41
42 # Client-side
43 <client>
44 <features>
45 NTLM
46 !SSPI
47 debug
48 </features>
49 <server>
50 http
51 </server>
52  <name>
53 HTTP with NTLM authorization when talking HTTP/1.0 (known to fail)
54  </name>
55  <setenv>
56 # we force our own host name, in order to make the test machine independent
57 CURL_GETHOSTNAME=curlhost
58 # we try to use the LD_PRELOAD hack, if not a debug build
59 LD_PRELOAD=%PWD/libtest/.libs/libhostname.so
60  </setenv>
61  <command>
62 http://%HOSTIP:%HTTPPORT/159 -u testuser:testpass --ntlm -0
63 </command>
64 <precheck>
65 chkhostname curlhost
66 </precheck>
67 </client>
68
69 # Verify data after the test has been "shot"
70 <verify>
71 <strip>
72 ^User-Agent:.*
73 </strip>
74 <protocol>
75 GET /159 HTTP/1.0\r
76 Host: %HOSTIP:%HTTPPORT\r
77 Authorization: NTLM TlRMTVNTUAABAAAABoIIAAAAAAAAAAAAAAAAAAAAAAA=\r
78 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
79 Accept: */*\r
80 \r
81 </protocol>
82 </verify>
83 </testcase>