1<testcase> 2<info> 3<keywords> 4HTTP 5HTTP POST 6HTTP NTLM auth 7</keywords> 8</info> 9# Server-side 10<reply> 11 12<!-- no <data> in this test since we have NTLM from the start 13 14This is supposed to be returned when the server gets a first 15Authorization: NTLM line passed-in from the client --> 16 17<data1001> 18HTTP/1.1 401 Now gimme that second request of crap 19Server: Microsoft-IIS/5.0 20Content-Type: text/html; charset=iso-8859-1 21Content-Length: 34 22WWW-Authenticate: NTLM TlRMTVNTUAACAAAAAgACADAAAAAGgoEAc51AYVDgyNcAAAAAAAAAAG4AbgAyAAAAQ0MCAAQAQwBDAAEAEgBFAEwASQBTAEEAQgBFAFQASAAEABgAYwBjAC4AaQBjAGUAZABlAHYALgBuAHUAAwAsAGUAbABpAHMAYQBiAGUAdABoAC4AYwBjAC4AaQBjAGUAZABlAHYALgBuAHUAAAAAAA== 23 24This is not the real page either! 25</data1001> 26 27# This is supposed to be returned when the server gets the second 28# Authorization: NTLM line passed-in from the client 29<data1002> 30HTTP/1.1 200 Things are fine in server land swsclose 31Server: Microsoft-IIS/5.0 32Content-Type: text/html; charset=iso-8859-1 33Content-Length: 32 34 35Finally, this is the real page! 36</data1002> 37 38<datacheck> 39HTTP/1.1 401 Now gimme that second request of crap 40Server: Microsoft-IIS/5.0 41Content-Type: text/html; charset=iso-8859-1 42Content-Length: 34 43WWW-Authenticate: NTLM TlRMTVNTUAACAAAAAgACADAAAAAGgoEAc51AYVDgyNcAAAAAAAAAAG4AbgAyAAAAQ0MCAAQAQwBDAAEAEgBFAEwASQBTAEEAQgBFAFQASAAEABgAYwBjAC4AaQBjAGUAZABlAHYALgBuAHUAAwAsAGUAbABpAHMAYQBiAGUAdABoAC4AYwBjAC4AaQBjAGUAZABlAHYALgBuAHUAAAAAAA== 44 45HTTP/1.1 200 Things are fine in server land swsclose 46Server: Microsoft-IIS/5.0 47Content-Type: text/html; charset=iso-8859-1 48Content-Length: 32 49 50Finally, this is the real page! 51</datacheck> 52 53</reply> 54 55# Client-side 56<client> 57<features> 58NTLM 59!SSPI 60</features> 61<server> 62http 63</server> 64 <name> 65HTTP POST with NTLM authorization and added custom headers 66 </name> 67 <setenv> 68# we force our own host name, in order to make the test machine independent 69CURL_GETHOSTNAME=curlhost 70# we try to use the LD_PRELOAD hack, if not a debug build 71LD_PRELOAD=%PWD/libtest/.libs/libhostname.so 72 </setenv> 73 <command> 74http://%HOSTIP:%HTTPPORT/267 -u testuser:testpass --ntlm -d "data" -H "Header1: yes" -H "Header2: no" 75</command> 76<precheck> 77chkhostname curlhost 78</precheck> 79</client> 80 81# Verify data after the test has been "shot" 82<verify> 83<strip> 84^User-Agent:.* 85</strip> 86<protocol nonewline="yes"> 87POST /267 HTTP/1.1 88Authorization: NTLM TlRMTVNTUAABAAAABoIIAAAAAAAAAAAAAAAAAAAAAAA= 89User-Agent: curl/7.10.6-pre1 (i686-pc-linux-gnu) libcurl/7.10.6-pre1 OpenSSL/0.9.7a ipv6 zlib/1.1.3 90Host: %HOSTIP:%HTTPPORT 91Accept: */* 92Header1: yes 93Header2: no 94Content-Length: 0 95Content-Type: application/x-www-form-urlencoded 96 97POST /267 HTTP/1.1 98Authorization: NTLM TlRMTVNTUAADAAAAGAAYAEAAAACeAJ4AWAAAAAAAAAD2AAAACAAIAPYAAAAIAAgA/gAAAAAAAAAAAAAABoKBAFuu0VIvKeMdPwjDPk7eAnwxMjM0NTY3OC1uDhL9DbZXt27JqdXMDkABAQAAAAAAAACAPtXesZ0BMTIzNDU2NzgAAAAAAgAEAEMAQwABABIARQBMAEkAUwBBAEIARQBUAEgABAAYAGMAYwAuAGkAYwBlAGQAZQB2AC4AbgB1AAMALABlAGwAaQBzAGEAYgBlAHQAaAAuAGMAYwAuAGkAYwBlAGQAZQB2AC4AbgB1AAAAAAAAAAAAdGVzdHVzZXJjdXJsaG9zdA== 99User-Agent: curl/7.10.6-pre1 (i686-pc-linux-gnu) libcurl/7.10.6-pre1 OpenSSL/0.9.7a ipv6 zlib/1.1.3 100Host: %HOSTIP:%HTTPPORT 101Accept: */* 102Header1: yes 103Header2: no 104Content-Length: 4 105Content-Type: application/x-www-form-urlencoded 106 107data 108</protocol> 109</verify> 110</testcase> 111