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