e6f34aedf073e1c3ace3d7fa3b34db69ca658035
[platform/upstream/curl.git] / tests / data / test91
1 <testcase>
2 <info>
3 <keywords>
4 HTTP
5 HTTP GET
6 HTTP NTLM auth
7 </keywords>
8 </info>
9 # Server-side
10 <reply>
11 <data>
12 HTTP/1.1 401 Authorization Required swsclose\r
13 Server: Apache/1.3.27 (Darwin) PHP/4.1.2\r
14 WWW-Authenticate: Magic-Negotiate\r
15 WWW-Authenticate: NTLM\r
16 WWW-Authenticate: Basic realm="daniel"\r
17 Content-Type: text/html; charset=iso-8859-1\r
18 Content-Length: 0\r
19 Connection: close\r
20 \r
21 </data>
22
23 # This is supposed to be returned when the server gets a first
24 # Authorization: NTLM line passed-in from the client
25 <data1001>
26 HTTP/1.1 401 Now gimme that second request of crap\r
27 Server: Microsoft-IIS/5.0\r
28 Content-Length: 34\r
29 Content-Type: text/html; charset=iso-8859-1\r
30 WWW-Authenticate: NTLM TlRMTVNTUAACAAAAAgACADAAAAAGgoEAc51AYVDgyNcAAAAAAAAAAG4AbgAyAAAAQ0MCAAQAQwBDAAEAEgBFAEwASQBTAEEAQgBFAFQASAAEABgAYwBjAC4AaQBjAGUAZABlAHYALgBuAHUAAwAsAGUAbABpAHMAYQBiAGUAdABoAC4AYwBjAC4AaQBjAGUAZABlAHYALgBuAHUAAAAAAA==\r
31 \r
32 This is not the real page either!
33 </data1001>
34
35 # This is supposed to be returned when the server gets the second
36 # Authorization: NTLM line passed-in from the client
37 <data1002>
38 HTTP/1.1 200 Things are fine in server land swsclose\r
39 Server: Microsoft-IIS/5.0\r
40 Content-Type: text/html; charset=iso-8859-1\r
41 Content-Length: 32\r
42 \r
43 Finally, this is the real page!
44 </data1002>
45
46 <datacheck>
47 HTTP/1.1 401 Authorization Required swsclose\r
48 Server: Apache/1.3.27 (Darwin) PHP/4.1.2\r
49 WWW-Authenticate: Magic-Negotiate\r
50 WWW-Authenticate: NTLM\r
51 WWW-Authenticate: Basic realm="daniel"\r
52 Content-Type: text/html; charset=iso-8859-1\r
53 Content-Length: 0\r
54 Connection: close\r
55 \r
56 HTTP/1.1 401 Now gimme that second request of crap\r
57 Server: Microsoft-IIS/5.0\r
58 Content-Length: 34\r
59 Content-Type: text/html; charset=iso-8859-1\r
60 WWW-Authenticate: NTLM TlRMTVNTUAACAAAAAgACADAAAAAGgoEAc51AYVDgyNcAAAAAAAAAAG4AbgAyAAAAQ0MCAAQAQwBDAAEAEgBFAEwASQBTAEEAQgBFAFQASAAEABgAYwBjAC4AaQBjAGUAZABlAHYALgBuAHUAAwAsAGUAbABpAHMAYQBiAGUAdABoAC4AYwBjAC4AaQBjAGUAZABlAHYALgBuAHUAAAAAAA==\r
61 \r
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 Content-Length: 32\r
66 \r
67 Finally, this is the real page!
68 </datacheck>
69
70 </reply>
71
72 # Client-side
73 <client>
74 <features>
75 NTLM
76 </features>
77 <server>
78 http
79 </server>
80  <name>
81 HTTP with NTLM/Negotiate/Basic, anyauth and user with domain, with size 0
82  </name>
83  <setenv>
84 # we force our own host name, in order to make the test machine independent
85 CURL_GETHOSTNAME=curlhost
86 # we try to use the LD_PRELOAD hack, if not a debug build
87 LD_PRELOAD=%PWD/libtest/.libs/libhostname.so
88  </setenv>
89  <command>
90 http://%HOSTIP:%HTTPPORT/91 --anyauth -u mydomain\\myself:secret
91 </command>
92 <precheck>
93 chkhostname curlhost
94 </precheck>
95 </client>
96
97 # Verify data after the test has been "shot"
98 <verify>
99 <strip>
100 ^User-Agent:.*
101 </strip>
102 <protocol>
103 GET /91 HTTP/1.1\r
104 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
105 Host: %HOSTIP:%HTTPPORT\r
106 Accept: */*\r
107 \r
108 GET /91 HTTP/1.1\r
109 Authorization: NTLM TlRMTVNTUAABAAAABoIIAAAAAAAAAAAAAAAAAAAAAAA=\r
110 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
111 Host: %HOSTIP:%HTTPPORT\r
112 Accept: */*\r
113 \r
114 GET /91 HTTP/1.1\r
115 Authorization: NTLM TlRMTVNTUAADAAAAGAAYAEAAAAAYABgAWAAAAAgACABwAAAABgAGAHgAAAAIAAgAfgAAAAAAAAAAAAAABoKBAMIyJpR5mHpg2FZha5kRaFZ9436GAxPu0C5llxexSQ5QzVkiLSfkcpVyRgCXXqR+Am15ZG9tYWlubXlzZWxmY3VybGhvc3Q=\r
116 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
117 Host: %HOSTIP:%HTTPPORT\r
118 Accept: */*\r
119 \r
120 </protocol>
121 </verify>
122 </testcase>