1<testcase>
2<info>
3<keywords>
4HTTP
5HTTP POST
6HTTP NTLM auth
7</keywords>
8</info>
9# Server-side
10<reply>
11
12<data>
13HTTP/1.1 200 Thanks for this! swsclose
14Content-Length: 25
15
16This is the final page !
17</data>
18
19<data1001>
20HTTP/1.1 401 Now gimme that second request of crap
21Server: Microsoft-IIS/5.0
22Content-Type: text/html; charset=iso-8859-1
23Content-Length: 34
24WWW-Authenticate: NTLM TlRMTVNTUAACAAAAAgACADAAAACGggEAc51AYVDgyNcAAAAAAAAAAG4AbgAyAAAAQ0MCAAQAQwBDAAEAEgBFAEwASQBTAEEAQgBFAFQASAAEABgAYwBjAC4AaQBjAGUAZABlAHYALgBuAHUAAwAsAGUAbABpAHMAYQBiAGUAdABoAC4AYwBjAC4AaQBjAGUAZABlAHYALgBuAHUAAAAAAA==
25
26This is not the real page either!
27</data1001>
28
29# This is supposed to be returned when the server gets the second
30# Authorization: NTLM line passed-in from the client
31<data1002>
32HTTP/1.1 302 Thanks for this, but we want to redir you!
33Server: Microsoft-IIS/5.0
34Content-Type: text/html; charset=iso-8859-1
35Location: /1100
36Content-Length: 34
37
38This is not the real page either!
39</data1002>
40
41<datacheck>
42HTTP/1.1 401 Now gimme that second request of crap
43Server: Microsoft-IIS/5.0
44Content-Type: text/html; charset=iso-8859-1
45Content-Length: 34
46WWW-Authenticate: NTLM TlRMTVNTUAACAAAAAgACADAAAACGggEAc51AYVDgyNcAAAAAAAAAAG4AbgAyAAAAQ0MCAAQAQwBDAAEAEgBFAEwASQBTAEEAQgBFAFQASAAEABgAYwBjAC4AaQBjAGUAZABlAHYALgBuAHUAAwAsAGUAbABpAHMAYQBiAGUAdABoAC4AYwBjAC4AaQBjAGUAZABlAHYALgBuAHUAAAAAAA==
47
48HTTP/1.1 302 Thanks for this, but we want to redir you!
49Server: Microsoft-IIS/5.0
50Content-Type: text/html; charset=iso-8859-1
51Location: /1100
52Content-Length: 34
53
54HTTP/1.1 200 Thanks for this! swsclose
55Content-Length: 25
56
57This is the final page !
58</datacheck>
59
60</reply>
61
62# Client-side
63<client>
64<features>
65NTLM
66SSL
67!SSPI
68debug
69</features>
70<server>
71http
72</server>
73 <name>
74HTTP POST with NTLM authorization and following a 302 redirect
75 </name>
76 <setenv>
77# we force our own host name, in order to make the test machine independent
78CURL_GETHOSTNAME=curlhost
79# we try to use the LD_PRELOAD hack, if not a debug build
80LD_PRELOAD=%PWD/libtest/.libs/libhostname.so
81 </setenv>
82 <command>
83http://%HOSTIP:%HTTPPORT/1100 -u testuser:testpass --ntlm -L -d "stuff to send away"
84</command>
85<precheck>
86chkhostname curlhost
87</precheck>
88</client>
89
90# Verify data after the test has been "shot"
91<verify>
92POST /1100 HTTP/1.1
93Host: %HOSTIP:%HTTPPORT
94Authorization: NTLM TlRMTVNTUAABAAAABoIIAAAAAAAAAAAAAAAAAAAAAAA=
95User-Agent: curl/%VERSION
96Accept: */*
97Content-Length: 0
98Content-Type: application/x-www-form-urlencoded
99
100POST /1100 HTTP/1.1
101Host: %HOSTIP:%HTTPPORT
102Authorization: NTLM TlRMTVNTUAADAAAAGAAYAEAAAAAYABgAWAAAAAAAAABwAAAACAAIAHAAAAAIAAgAeAAAAAAAAAAAAAAAhoIBADQzMjE1MzIxAAAAAAAAAAAAAAAAAAAAADj3hs3u3j0kgJqCrLM+74BmaoNHDfIJjHRlc3R1c2VyY3VybGhvc3Q=
103User-Agent: curl/%VERSION
104Accept: */*
105Content-Length: 18
106Content-Type: application/x-www-form-urlencoded
107
108stuff to send awayGET /1100 HTTP/1.1
109Host: %HOSTIP:%HTTPPORT
110User-Agent: curl/%VERSION
111Accept: */*
112
113</protocol>
114</verify>
115</testcase>
116