xref: /curl/tests/data/test155 (revision e7a021e1)
1<testcase>
2<info>
3<keywords>
4HTTP
5HTTP PUT
6HTTP NTLM auth
7NTLM
8</keywords>
9</info>
10
11# Server-side
12<reply>
13<data>
14HTTP/1.1 401 NTLM Authorization Required swsclose
15Server: Apache/1.3.27 (Darwin) PHP/4.1.2
16WWW-Authenticate: Blackmagic realm="gimme all yer s3cr3ts"
17WWW-Authenticate: Basic realm="gimme all yer s3cr3ts"
18WWW-Authenticate: NTLM
19Content-Type: text/html; charset=iso-8859-1
20Connection: close
21
22moo
23</data>
24
25# This is supposed to be returned when the server gets a first
26# Authorization: NTLM line passed-in from the client
27<data1001>
28HTTP/1.1 401 Type-1 received, send back type-2
29Server: Microsoft-IIS/5.0
30Content-Length: 34
31Content-Type: text/html; charset=iso-8859-1
32WWW-Authenticate: NTLM TlRMTVNTUAACAAAAAgACADAAAACGggEAc51AYVDgyNcAAAAAAAAAAG4AbgAyAAAAQ0MCAAQAQwBDAAEAEgBFAEwASQBTAEEAQgBFAFQASAAEABgAYwBjAC4AaQBjAGUAZABlAHYALgBuAHUAAwAsAGUAbABpAHMAYQBiAGUAdABoAC4AYwBjAC4AaQBjAGUAZABlAHYALgBuAHUAAAAAAA==
33
34This is not the real page either!
35</data1001>
36
37# This is supposed to be returned when the server gets the second
38# Authorization: NTLM line passed-in from the client
39<data1002>
40HTTP/1.1 200 Type-3 Received and all Things are fine swsclose
41Server: Microsoft-IIS/5.0
42Content-Type: text/html; charset=iso-8859-1
43Content-Length: 32
44
45Finally, this is the real page!
46</data1002>
47
48<datacheck>
49HTTP/1.1 401 NTLM Authorization Required swsclose
50Server: Apache/1.3.27 (Darwin) PHP/4.1.2
51WWW-Authenticate: Blackmagic realm="gimme all yer s3cr3ts"
52WWW-Authenticate: Basic realm="gimme all yer s3cr3ts"
53WWW-Authenticate: NTLM
54Content-Type: text/html; charset=iso-8859-1
55Connection: close
56
57HTTP/1.1 401 Type-1 received, send back type-2
58Server: Microsoft-IIS/5.0
59Content-Length: 34
60Content-Type: text/html; charset=iso-8859-1
61WWW-Authenticate: NTLM TlRMTVNTUAACAAAAAgACADAAAACGggEAc51AYVDgyNcAAAAAAAAAAG4AbgAyAAAAQ0MCAAQAQwBDAAEAEgBFAEwASQBTAEEAQgBFAFQASAAEABgAYwBjAC4AaQBjAGUAZABlAHYALgBuAHUAAwAsAGUAbABpAHMAYQBiAGUAdABoAC4AYwBjAC4AaQBjAGUAZABlAHYALgBuAHUAAAAAAA==
62
63HTTP/1.1 200 Type-3 Received and all Things are fine swsclose
64Server: Microsoft-IIS/5.0
65Content-Type: text/html; charset=iso-8859-1
66Content-Length: 32
67
68Finally, this is the real page!
69</datacheck>
70
71</reply>
72
73# Client-side
74<client>
75<features>
76NTLM
77SSL
78!SSPI
79</features>
80<server>
81http
82</server>
83<name>
84HTTP PUT with --anyauth authorization (picking NTLM)
85</name>
86<command>
87http://%HOSTIP:%HTTPPORT/%TESTNUMBER -T %LOGDIR/put%TESTNUMBER -u testuser:testpass --anyauth
88</command>
89<file name="%LOGDIR/put%TESTNUMBER">
90This is data we upload with PUT
91a second line
92line three
93four is the number of lines
94</file>
95</client>
96
97# Verify data after the test has been "shot"
98<verify>
99<protocol>
100PUT /%TESTNUMBER HTTP/1.1
101Host: %HOSTIP:%HTTPPORT
102User-Agent: curl/%VERSION
103Accept: */*
104Content-Length: 85
105
106This is data we upload with PUT
107a second line
108line three
109four is the number of lines
110PUT /%TESTNUMBER HTTP/1.1
111Host: %HOSTIP:%HTTPPORT
112Authorization: NTLM TlRMTVNTUAABAAAABoIIAAAAAAAAAAAAAAAAAAAAAAA=
113User-Agent: curl/%VERSION
114Accept: */*
115Content-Length: 0
116
117PUT /%TESTNUMBER HTTP/1.1
118Host: %HOSTIP:%HTTPPORT
119Authorization: NTLM TlRMTVNTUAADAAAAGAAYAEAAAAAYABgAWAAAAAAAAABwAAAACAAIAHAAAAALAAsAeAAAAAAAAAAAAAAAhoIBAFpkQwKRCZFMhjj0tw47wEjKHRHlvzfxQamFcheMuv8v+xeqphEO5V41xRd7R9deOXRlc3R1c2VyV09SS1NUQVRJT04=
120User-Agent: curl/%VERSION
121Accept: */*
122Content-Length: 85
123
124This is data we upload with PUT
125a second line
126line three
127four is the number of lines
128</protocol>
129</verify>
130</testcase>
131