1<testcase> 2<info> 3<keywords> 4HTTP 5HTTP GET 6HTTP NTLM auth 7</keywords> 8</info> 9# Server-side 10<reply> 11<data> 12HTTP/1.1 401 Authorization Required swsclose 13Server: Apache/1.3.27 (Darwin) PHP/4.1.2 14WWW-Authenticate: Magic-Negotiate 15WWW-Authenticate: NTLM 16WWW-Authenticate: Basic realm="daniel" 17Content-Type: text/html; charset=iso-8859-1 18Content-Length: 0 19Connection: close 20 21</data> 22 23# This is supposed to be returned when the server gets a first 24# Authorization: NTLM line passed-in from the client 25<data1001> 26HTTP/1.1 401 Now gimme that second request of crap 27Server: Microsoft-IIS/5.0 28Content-Length: 34 29Content-Type: text/html; charset=iso-8859-1 30WWW-Authenticate: NTLM TlRMTVNTUAACAAAAAgACADAAAACGggEAc51AYVDgyNcAAAAAAAAAAG4AbgAyAAAAQ0MCAAQAQwBDAAEAEgBFAEwASQBTAEEAQgBFAFQASAAEABgAYwBjAC4AaQBjAGUAZABlAHYALgBuAHUAAwAsAGUAbABpAHMAYQBiAGUAdABoAC4AYwBjAC4AaQBjAGUAZABlAHYALgBuAHUAAAAAAA== 31 32This is not the real page either! 33</data1001> 34 35# This is supposed to be returned when the server gets the second 36# Authorization: NTLM line passed-in from the client 37<data1002> 38HTTP/1.1 200 Things are fine in server land swsclose 39Server: Microsoft-IIS/5.0 40Content-Type: text/html; charset=iso-8859-1 41Content-Length: 32 42 43Finally, this is the real page! 44</data1002> 45 46<datacheck> 47HTTP/1.1 401 Authorization Required swsclose 48Server: Apache/1.3.27 (Darwin) PHP/4.1.2 49WWW-Authenticate: Magic-Negotiate 50WWW-Authenticate: NTLM 51WWW-Authenticate: Basic realm="daniel" 52Content-Type: text/html; charset=iso-8859-1 53Content-Length: 0 54Connection: close 55 56HTTP/1.1 401 Now gimme that second request of crap 57Server: Microsoft-IIS/5.0 58Content-Length: 34 59Content-Type: text/html; charset=iso-8859-1 60WWW-Authenticate: NTLM TlRMTVNTUAACAAAAAgACADAAAACGggEAc51AYVDgyNcAAAAAAAAAAG4AbgAyAAAAQ0MCAAQAQwBDAAEAEgBFAEwASQBTAEEAQgBFAFQASAAEABgAYwBjAC4AaQBjAGUAZABlAHYALgBuAHUAAwAsAGUAbABpAHMAYQBiAGUAdABoAC4AYwBjAC4AaQBjAGUAZABlAHYALgBuAHUAAAAAAA== 61 62HTTP/1.1 200 Things are fine in server land swsclose 63Server: Microsoft-IIS/5.0 64Content-Type: text/html; charset=iso-8859-1 65Content-Length: 32 66 67Finally, this is the real page! 68</datacheck> 69 70</reply> 71 72# Client-side 73<client> 74<features> 75NTLM 76SSL 77!SSPI 78debug 79</features> 80<server> 81http 82</server> 83 <name> 84HTTP with NTLM/Negotiate/Basic, anyauth and user with domain, with size 0 85 </name> 86 <setenv> 87# we force our own host name, in order to make the test machine independent 88CURL_GETHOSTNAME=curlhost 89# we try to use the LD_PRELOAD hack, if not a debug build 90LD_PRELOAD=%PWD/libtest/.libs/libhostname.so 91 </setenv> 92 <command> 93http://%HOSTIP:%HTTPPORT/91 --anyauth -u mydomain\\myself:secret 94</command> 95<precheck> 96chkhostname curlhost 97</precheck> 98</client> 99 100# Verify data after the test has been "shot" 101<verify> 102<protocol> 103GET /91 HTTP/1.1 104Host: %HOSTIP:%HTTPPORT 105User-Agent: curl/%VERSION 106Accept: */* 107 108GET /91 HTTP/1.1 109Host: %HOSTIP:%HTTPPORT 110Authorization: NTLM TlRMTVNTUAABAAAABoIIAAAAAAAAAAAAAAAAAAAAAAA= 111User-Agent: curl/%VERSION 112Accept: */* 113 114GET /91 HTTP/1.1 115Host: %HOSTIP:%HTTPPORT 116Authorization: NTLM TlRMTVNTUAADAAAAGAAYAEAAAAAYABgAWAAAAAgACABwAAAABgAGAHgAAAAIAAgAfgAAAAAAAAAAAAAAhoIBADQzMjE1MzIxAAAAAAAAAAAAAAAAAAAAAKBS3rdGYZEGsqW8otYHWXWBxC5mCuFmYm15ZG9tYWlubXlzZWxmY3VybGhvc3Q= 117User-Agent: curl/%VERSION 118Accept: */* 119 120</protocol> 121</verify> 122</testcase> 123