1<testcase> 2<info> 3<keywords> 4HTTP 5HTTP GET 6HTTP NTLM auth 7followlocation 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 301 Things are fine in server land swsclose 32Server: Microsoft-IIS/5.0 33Connection: close 34Location: /you/%TESTNUMBER0010 35 36</data1002> 37 38# This is the first reply after the redirection 39<data1011> 40HTTP/1.1 401 Now gimme that second round of crap 41Server: Microsoft-IIS/5.0 42Content-Type: text/html; charset=iso-8859-1 43Content-Length: 34 44WWW-Authenticate: NTLM TlRMTVNTUAACAAAAAgACADAAAACGggEAc51AYVDgyNcAAAAAAAAAAG4AbgAyAAAAQ0MCAAQAQwBDAAEAEgBFAEwASQBTAEEAQgBFAFQASAAEABgAYwBjAC4AaQBjAGUAZABlAHYALgBuAHUAAwAsAGUAbABpAHMAYQBiAGUAdABoAC4AYwBjAC4AaQBjAGUAZABlAHYALgBuAHUAAAAAAA== 45 46This is not the real page either! 47</data1011> 48 49# This is supposed to be returned when the server gets the second 50# Authorization: NTLM line passed-in from the client 51<data1012> 52HTTP/1.1 200 Things are fine in server land swsclose 53Server: Microsoft-IIS/5.0 54Content-Type: text/html; charset=iso-8859-1 55Content-Length: 32 56 57Finally, this is the real page! 58</data1012> 59 60<datacheck> 61HTTP/1.1 401 Now gimme that second request of crap 62Server: Microsoft-IIS/5.0 63Content-Type: text/html; charset=iso-8859-1 64Content-Length: 34 65WWW-Authenticate: NTLM TlRMTVNTUAACAAAAAgACADAAAACGggEAc51AYVDgyNcAAAAAAAAAAG4AbgAyAAAAQ0MCAAQAQwBDAAEAEgBFAEwASQBTAEEAQgBFAFQASAAEABgAYwBjAC4AaQBjAGUAZABlAHYALgBuAHUAAwAsAGUAbABpAHMAYQBiAGUAdABoAC4AYwBjAC4AaQBjAGUAZABlAHYALgBuAHUAAAAAAA== 66 67HTTP/1.1 301 Things are fine in server land swsclose 68Server: Microsoft-IIS/5.0 69Connection: close 70Location: /you/%TESTNUMBER0010 71 72HTTP/1.1 401 Now gimme that second round of crap 73Server: Microsoft-IIS/5.0 74Content-Type: text/html; charset=iso-8859-1 75Content-Length: 34 76WWW-Authenticate: NTLM TlRMTVNTUAACAAAAAgACADAAAACGggEAc51AYVDgyNcAAAAAAAAAAG4AbgAyAAAAQ0MCAAQAQwBDAAEAEgBFAEwASQBTAEEAQgBFAFQASAAEABgAYwBjAC4AaQBjAGUAZABlAHYALgBuAHUAAwAsAGUAbABpAHMAYQBiAGUAdABoAC4AYwBjAC4AaQBjAGUAZABlAHYALgBuAHUAAAAAAA== 77 78HTTP/1.1 200 Things are fine in server land swsclose 79Server: Microsoft-IIS/5.0 80Content-Type: text/html; charset=iso-8859-1 81Content-Length: 32 82 83Finally, this is the real page! 84</datacheck> 85 86</reply> 87 88# Client-side 89<client> 90<features> 91NTLM 92SSL 93!SSPI 94debug 95</features> 96<server> 97http 98</server> 99 <name> 100HTTP with NTLM and follow-location 101 </name> 102 <setenv> 103# we force our own host name, in order to make the test machine independent 104CURL_GETHOSTNAME=curlhost 105# we try to use the LD_PRELOAD hack, if not a debug build 106LD_PRELOAD=%PWD/libtest/.libs/libhostname.so 107 </setenv> 108 <command> 109http://%HOSTIP:%HTTPPORT/%TESTNUMBER -u testuser:testpass --ntlm -L 110</command> 111<precheck> 112chkhostname curlhost 113</precheck> 114</client> 115 116# Verify data after the test has been "shot" 117<verify> 118<protocol> 119GET /%TESTNUMBER HTTP/1.1 120Host: %HOSTIP:%HTTPPORT 121Authorization: NTLM TlRMTVNTUAABAAAABoIIAAAAAAAAAAAAAAAAAAAAAAA= 122User-Agent: curl/%VERSION 123Accept: */* 124 125GET /%TESTNUMBER HTTP/1.1 126Host: %HOSTIP:%HTTPPORT 127Authorization: NTLM TlRMTVNTUAADAAAAGAAYAEAAAAAYABgAWAAAAAAAAABwAAAACAAIAHAAAAAIAAgAeAAAAAAAAAAAAAAAhoIBAFpkQwKRCZFMhjj0tw47wEjKHRHlvzfxQamFcheMuv8v+xeqphEO5V41xRd7R9deOXRlc3R1c2VyY3VybGhvc3Q= 128User-Agent: curl/%VERSION 129Accept: */* 130 131GET /you/%TESTNUMBER0010 HTTP/1.1 132Host: %HOSTIP:%HTTPPORT 133Authorization: NTLM TlRMTVNTUAABAAAABoIIAAAAAAAAAAAAAAAAAAAAAAA= 134User-Agent: curl/%VERSION 135Accept: */* 136 137GET /you/%TESTNUMBER0010 HTTP/1.1 138Host: %HOSTIP:%HTTPPORT 139Authorization: NTLM TlRMTVNTUAADAAAAGAAYAEAAAAAYABgAWAAAAAAAAABwAAAACAAIAHAAAAAIAAgAeAAAAAAAAAAAAAAAhoIBAFpkQwKRCZFMhjj0tw47wEjKHRHlvzfxQamFcheMuv8v+xeqphEO5V41xRd7R9deOXRlc3R1c2VyY3VybGhvc3Q= 140User-Agent: curl/%VERSION 141Accept: */* 142 143</protocol> 144</verify> 145</testcase> 146