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 TlRMTVNTUAACAAAAAgACADAAAAAGgoEAc51AYVDgyNcAAAAAAAAAAG4AbgAyAAAAQ0MCAAQAQwBDAAEAEgBFAEwASQBTAEEAQgBFAFQASAAEABgAYwBjAC4AaQBjAGUAZABlAHYALgBuAHUAAwAsAGUAbABpAHMAYQBiAGUAdABoAC4AYwBjAC4AaQBjAGUAZABlAHYALgBuAHUAAAAAAA== 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/890010 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 TlRMTVNTUAACAAAAAgACADAAAAAGgoEAc51AYVDgyNcAAAAAAAAAAG4AbgAyAAAAQ0MCAAQAQwBDAAEAEgBFAEwASQBTAEEAQgBFAFQASAAEABgAYwBjAC4AaQBjAGUAZABlAHYALgBuAHUAAwAsAGUAbABpAHMAYQBiAGUAdABoAC4AYwBjAC4AaQBjAGUAZABlAHYALgBuAHUAAAAAAA== 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 TlRMTVNTUAACAAAAAgACADAAAAAGgoEAc51AYVDgyNcAAAAAAAAAAG4AbgAyAAAAQ0MCAAQAQwBDAAEAEgBFAEwASQBTAEEAQgBFAFQASAAEABgAYwBjAC4AaQBjAGUAZABlAHYALgBuAHUAAwAsAGUAbABpAHMAYQBiAGUAdABoAC4AYwBjAC4AaQBjAGUAZABlAHYALgBuAHUAAAAAAA== 66 67HTTP/1.1 301 Things are fine in server land swsclose 68Server: Microsoft-IIS/5.0 69Connection: close 70Location: /you/890010 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 TlRMTVNTUAACAAAAAgACADAAAAAGgoEAc51AYVDgyNcAAAAAAAAAAG4AbgAyAAAAQ0MCAAQAQwBDAAEAEgBFAEwASQBTAEEAQgBFAFQASAAEABgAYwBjAC4AaQBjAGUAZABlAHYALgBuAHUAAwAsAGUAbABpAHMAYQBiAGUAdABoAC4AYwBjAC4AaQBjAGUAZABlAHYALgBuAHUAAAAAAA== 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 92</features> 93<server> 94http 95</server> 96 <name> 97HTTP with NTLM and follow-location 98 </name> 99 <setenv> 100# we force our own host name, in order to make the test machine independent 101CURL_GETHOSTNAME=curlhost 102# we try to use the LD_PRELOAD hack, if not a debug build 103LD_PRELOAD=%PWD/libtest/.libs/libhostname.so 104 </setenv> 105 <command> 106http://%HOSTIP:%HTTPPORT/89 -u testuser:testpass --ntlm -L 107</command> 108<precheck> 109chkhostname curlhost 110</precheck> 111</client> 112 113# Verify data after the test has been "shot" 114<verify> 115<strip> 116^User-Agent:.* 117</strip> 118<protocol> 119GET /89 HTTP/1.1 120Authorization: NTLM TlRMTVNTUAABAAAABoIIAAAAAAAAAAAAAAAAAAAAAAA= 121User-Agent: curl/7.10.6-pre1 (i686-pc-linux-gnu) libcurl/7.10.6-pre1 OpenSSL/0.9.7a ipv6 zlib/1.1.3 122Host: %HOSTIP:%HTTPPORT 123Accept: */* 124 125GET /89 HTTP/1.1 126Authorization: NTLM TlRMTVNTUAADAAAAGAAYAEAAAAAYABgAWAAAAAAAAABwAAAACAAIAHAAAAAIAAgAeAAAAAAAAAAAAAAABoKBAFpkQwKRCZFMhjj0tw47wEjKHRHlvzfxQamFcheMuv8v+xeqphEO5V41xRd7R9deOXRlc3R1c2VyY3VybGhvc3Q= 127User-Agent: curl/7.10.6-pre1 (i686-pc-linux-gnu) libcurl/7.10.6-pre1 OpenSSL/0.9.7a ipv6 zlib/1.1.3 128Host: %HOSTIP:%HTTPPORT 129Accept: */* 130 131GET /you/890010 HTTP/1.1 132Authorization: NTLM TlRMTVNTUAABAAAABoIIAAAAAAAAAAAAAAAAAAAAAAA= 133User-Agent: curl/7.10.8-pre1 (i686-pc-linux-gnu) libcurl/7.10.8-pre1 OpenSSL/0.9.7a ipv6 zlib/1.1.3 GSS 134Host: %HOSTIP:%HTTPPORT 135Accept: */* 136 137GET /you/890010 HTTP/1.1 138Authorization: NTLM TlRMTVNTUAADAAAAGAAYAEAAAAAYABgAWAAAAAAAAABwAAAACAAIAHAAAAAIAAgAeAAAAAAAAAAAAAAABoKBAFpkQwKRCZFMhjj0tw47wEjKHRHlvzfxQamFcheMuv8v+xeqphEO5V41xRd7R9deOXRlc3R1c2VyY3VybGhvc3Q= 139User-Agent: curl/7.10.8-pre1 (i686-pc-linux-gnu) libcurl/7.10.8-pre1 OpenSSL/0.9.7a ipv6 zlib/1.1.3 GSS 140Host: %HOSTIP:%HTTPPORT 141Accept: */* 142 143</protocol> 144</verify> 145</testcase> 146