xref: /curl/tests/data/test267 (revision 5a41abef)
1<testcase>
2<info>
3<keywords>
4HTTP
5HTTP POST
6HTTP NTLM auth
7NTLM
8</keywords>
9</info>
10# Server-side
11<reply>
12
13<!-- no <data> in this test since we have NTLM from the start
14
15This is supposed to be returned when the server gets a first
16Authorization: NTLM line passed-in from the client -->
17
18<data1001>
19HTTP/1.1 401 Now gimme that second request of crap
20Server: Microsoft-IIS/5.0
21Content-Type: text/html; charset=iso-8859-1
22Content-Length: 34
23WWW-Authenticate: NTLM TlRMTVNTUAACAAAAAgACADAAAACGggEAc51AYVDgyNcAAAAAAAAAAG4AbgAyAAAAQ0MCAAQAQwBDAAEAEgBFAEwASQBTAEEAQgBFAFQASAAEABgAYwBjAC4AaQBjAGUAZABlAHYALgBuAHUAAwAsAGUAbABpAHMAYQBiAGUAdABoAC4AYwBjAC4AaQBjAGUAZABlAHYALgBuAHUAAAAAAA==
24
25This is not the real page either!
26</data1001>
27
28# This is supposed to be returned when the server gets the second
29# Authorization: NTLM line passed-in from the client
30<data1002>
31HTTP/1.1 200 Things are fine in server land swsclose
32Server: Microsoft-IIS/5.0
33Content-Type: text/html; charset=iso-8859-1
34Content-Length: 32
35
36Finally, this is the real page!
37</data1002>
38
39<datacheck>
40HTTP/1.1 401 Now gimme that second request of crap
41Server: Microsoft-IIS/5.0
42Content-Type: text/html; charset=iso-8859-1
43Content-Length: 34
44WWW-Authenticate: NTLM TlRMTVNTUAACAAAAAgACADAAAACGggEAc51AYVDgyNcAAAAAAAAAAG4AbgAyAAAAQ0MCAAQAQwBDAAEAEgBFAEwASQBTAEEAQgBFAFQASAAEABgAYwBjAC4AaQBjAGUAZABlAHYALgBuAHUAAwAsAGUAbABpAHMAYQBiAGUAdABoAC4AYwBjAC4AaQBjAGUAZABlAHYALgBuAHUAAAAAAA==
45
46HTTP/1.1 200 Things are fine in server land swsclose
47Server: Microsoft-IIS/5.0
48Content-Type: text/html; charset=iso-8859-1
49Content-Length: 32
50
51Finally, this is the real page!
52</datacheck>
53
54</reply>
55
56# Client-side
57<client>
58<features>
59NTLM
60SSL
61!SSPI
62</features>
63<server>
64http
65</server>
66<name>
67HTTP POST with NTLM authorization and added custom headers
68</name>
69<command>
70http://%HOSTIP:%HTTPPORT/%TESTNUMBER -u testuser:testpass --ntlm -d "data" -H "Header1: yes" -H "Header2: no"
71</command>
72</client>
73
74# Verify data after the test has been "shot"
75<verify>
76<protocol nonewline="yes">
77POST /%TESTNUMBER HTTP/1.1
78Host: %HOSTIP:%HTTPPORT
79Authorization: NTLM TlRMTVNTUAABAAAABoIIAAAAAAAAAAAAAAAAAAAAAAA=
80User-Agent: curl/%VERSION
81Accept: */*
82Header1: yes
83Header2: no
84Content-Length: 0
85Content-Type: application/x-www-form-urlencoded
86
87POST /%TESTNUMBER HTTP/1.1
88Host: %HOSTIP:%HTTPPORT
89Authorization: NTLM TlRMTVNTUAADAAAAGAAYAEAAAAAYABgAWAAAAAAAAABwAAAACAAIAHAAAAALAAsAeAAAAAAAAAAAAAAAhoIBAFpkQwKRCZFMhjj0tw47wEjKHRHlvzfxQamFcheMuv8v+xeqphEO5V41xRd7R9deOXRlc3R1c2VyV09SS1NUQVRJT04=
90User-Agent: curl/%VERSION
91Accept: */*
92Header1: yes
93Header2: no
94Content-Length: 4
95Content-Type: application/x-www-form-urlencoded
96
97data
98</protocol>
99</verify>
100</testcase>
101