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 TlRMTVNTUAACAAAAAgACADAAAAAGgoEAc51AYVDgyNcAAAAAAAAAAG4AbgAyAAAAQ0MCAAQAQwBDAAEAEgBFAEwASQBTAEEAQgBFAFQASAAEABgAYwBjAC4AaQBjAGUAZABlAHYALgBuAHUAAwAsAGUAbABpAHMAYQBiAGUAdABoAC4AYwBjAC4AaQBjAGUAZABlAHYALgBuAHUAAAAAAA== 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 TlRMTVNTUAACAAAAAgACADAAAAAGgoEAc51AYVDgyNcAAAAAAAAAAG4AbgAyAAAAQ0MCAAQAQwBDAAEAEgBFAEwASQBTAEEAQgBFAFQASAAEABgAYwBjAC4AaQBjAGUAZABlAHYALgBuAHUAAwAsAGUAbABpAHMAYQBiAGUAdABoAC4AYwBjAC4AaQBjAGUAZABlAHYALgBuAHUAAAAAAA== 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 66!SSPI 67</features> 68<server> 69http 70</server> 71 <name> 72HTTP POST with NTLM authorization and following a 302 redirect 73 </name> 74 <setenv> 75# we force our own host name, in order to make the test machine independent 76CURL_GETHOSTNAME=curlhost 77# we try to use the LD_PRELOAD hack, if not a debug build 78LD_PRELOAD=%PWD/libtest/.libs/libhostname.so 79 </setenv> 80 <command> 81http://%HOSTIP:%HTTPPORT/1100 -u testuser:testpass --ntlm -L -d "stuff to send away" 82</command> 83<precheck> 84chkhostname curlhost 85</precheck> 86</client> 87 88# Verify data after the test has been "shot" 89<verify> 90<strip> 91^User-Agent:.* 92</strip> 93<protocol> 94POST /1100 HTTP/1.1 95Authorization: NTLM TlRMTVNTUAABAAAABoIIAAAAAAAAAAAAAAAAAAAAAAA= 96User-Agent: curl/7.10.6-pre1 (i686-pc-linux-gnu) libcurl/7.10.6-pre1 OpenSSL/0.9.7a ipv6 zlib/1.1.3 97Host: %HOSTIP:%HTTPPORT 98Accept: */* 99Content-Length: 0 100Content-Type: application/x-www-form-urlencoded 101 102POST /1100 HTTP/1.1 103Authorization: NTLM TlRMTVNTUAADAAAAGAAYAEAAAACeAJ4AWAAAAAAAAAD2AAAACAAIAPYAAAAIAAgA/gAAAAAAAAAAAAAABoKBAFuu0VIvKeMdPwjDPk7eAnwxMjM0NTY3OC1uDhL9DbZXt27JqdXMDkABAQAAAAAAAACAPtXesZ0BMTIzNDU2NzgAAAAAAgAEAEMAQwABABIARQBMAEkAUwBBAEIARQBUAEgABAAYAGMAYwAuAGkAYwBlAGQAZQB2AC4AbgB1AAMALABlAGwAaQBzAGEAYgBlAHQAaAAuAGMAYwAuAGkAYwBlAGQAZQB2AC4AbgB1AAAAAAAAAAAAdGVzdHVzZXJjdXJsaG9zdA== 104User-Agent: curl/7.10.6-pre1 (i686-pc-linux-gnu) libcurl/7.10.6-pre1 OpenSSL/0.9.7a ipv6 zlib/1.1.3 105Host: %HOSTIP:%HTTPPORT 106Accept: */* 107Content-Length: 18 108Content-Type: application/x-www-form-urlencoded 109 110stuff to send awayGET /1100 HTTP/1.1 111User-Agent: curl/7.19.5-CVS (i686-pc-linux-gnu) libcurl/7.19.5-CVS GnuTLS/2.6.6 zlib/1.2.3.3 c-ares/1.6.1-CVS libidn/1.14 libssh2/1.1 112Host: %HOSTIP:%HTTPPORT 113Accept: */* 114 115</protocol> 116</verify> 117</testcase> 118