1<testcase>
2# Server-side
3<reply>
4<servercmd>
5auth_required
6</servercmd>
7<data>
8HTTP/1.1 401 NTLM Authorization Required swsclose
9Server: Apache/1.3.27 (Darwin) PHP/4.1.2
10WWW-Authenticate: Blackmagic realm="gimme all yer s3cr3ts"
11WWW-Authenticate: Basic realm="gimme all yer s3cr3ts"
12WWW-Authenticate: NTLM
13Content-Type: text/html; charset=iso-8859-1
14Connection: close
15
16moo
17</data>
18
19# This is supposed to be returned when the server gets a first
20# Authorization: NTLM line passed-in from the client
21<data1001>
22HTTP/1.1 401 Type-1 received, send back type-2
23Server: Microsoft-IIS/5.0
24Content-Length: 34
25Content-Type: text/html; charset=iso-8859-1
26WWW-Authenticate: NTLM TlRMTVNTUAACAAAAAgACADAAAAAGgoEAc51AYVDgyNcAAAAAAAAAAG4AbgAyAAAAQ0MCAAQAQwBDAAEAEgBFAEwASQBTAEEAQgBFAFQASAAEABgAYwBjAC4AaQBjAGUAZABlAHYALgBuAHUAAwAsAGUAbABpAHMAYQBiAGUAdABoAC4AYwBjAC4AaQBjAGUAZABlAHYALgBuAHUAAAAAAA==
27
28This is not the real page either!
29</data1001>
30
31# This is supposed to be returned when the server gets the second
32# Authorization: NTLM line passed-in from the client
33<data1002>
34HTTP/1.1 200 Type-3 Recevied and all Things are fine swsclose
35Server: Microsoft-IIS/5.0
36Content-Type: text/html; charset=iso-8859-1
37Content-Length: 32
38
39Finally, this is the real page!
40</data1002>
41
42<datacheck>
43HTTP/1.1 401 NTLM Authorization Required swsclose
44Server: Apache/1.3.27 (Darwin) PHP/4.1.2
45WWW-Authenticate: Blackmagic realm="gimme all yer s3cr3ts"
46WWW-Authenticate: Basic realm="gimme all yer s3cr3ts"
47WWW-Authenticate: NTLM
48Content-Type: text/html; charset=iso-8859-1
49Connection: close
50
51HTTP/1.1 401 Type-1 received, send back type-2
52Server: Microsoft-IIS/5.0
53Content-Length: 34
54Content-Type: text/html; charset=iso-8859-1
55WWW-Authenticate: NTLM TlRMTVNTUAACAAAAAgACADAAAAAGgoEAc51AYVDgyNcAAAAAAAAAAG4AbgAyAAAAQ0MCAAQAQwBDAAEAEgBFAEwASQBTAEEAQgBFAFQASAAEABgAYwBjAC4AaQBjAGUAZABlAHYALgBuAHUAAwAsAGUAbABpAHMAYQBiAGUAdABoAC4AYwBjAC4AaQBjAGUAZABlAHYALgBuAHUAAAAAAA==
56
57HTTP/1.1 200 Type-3 Recevied and all Things are fine swsclose
58Server: Microsoft-IIS/5.0
59Content-Type: text/html; charset=iso-8859-1
60Content-Length: 32
61
62Finally, this is the real page!
63</datacheck>
64
65</reply>
66
67# Client-side
68<client>
69<features>
70NTLM
71</features>
72<server>
73http
74</server>
75 <name>
76HTTP PUT with --anyauth authorization (picking NTLM)
77 </name>
78 <setenv>
79# we force our own host name, in order to make the test machine independent
80CURL_GETHOSTNAME=curlhost
81# we try to use the LD_PRELOAD hack, if not a debug build
82LD_PRELOAD=%PWD/libtest/.libs/libhostname.so
83 </setenv>
84 <command>
85http://%HOSTIP:%HTTPPORT/155 -T log/put155 -u testuser:testpass --anyauth
86</command>
87<precheck>
88chkhostname curlhost
89</precheck>
90<file name="log/put155">
91This is data we upload with PUT
92a second line
93line three
94four is the number of lines
95</file>
96</client>
97
98# Verify data after the test has been "shot"
99<verify>
100<strip>
101^User-Agent:.*
102</strip>
103<protocol>
104PUT /155 HTTP/1.1
105Host: %HOSTIP:%HTTPPORT
106Accept: */*
107Content-Length: 85
108Expect: 100-continue
109
110PUT /155 HTTP/1.1
111Authorization: NTLM TlRMTVNTUAABAAAABoIIAAAAAAAAAAAAAAAAAAAAAAA=
112Host: %HOSTIP:%HTTPPORT
113Accept: */*
114Content-Length: 0
115Expect: 100-continue
116
117PUT /155 HTTP/1.1
118Authorization: NTLM TlRMTVNTUAADAAAAGAAYAEAAAAAYABgAWAAAAAAAAABwAAAACAAIAHAAAAAIAAgAeAAAAAAAAAAAAAAABoKBAFpkQwKRCZFMhjj0tw47wEjKHRHlvzfxQamFcheMuv8v+xeqphEO5V41xRd7R9deOXRlc3R1c2VyY3VybGhvc3Q=
119User-Agent: curl/7.10.5 (i686-pc-linux-gnu) libcurl/7.10.5 OpenSSL/0.9.7a ipv6 zlib/1.1.3
120Host: %HOSTIP:%HTTPPORT
121Accept: */*
122Content-Length: 85
123Expect: 100-continue
124
125This is data we upload with PUT
126a second line
127line three
128four is the number of lines
129</protocol>
130</verify>
131</testcase>
132