Revert "Update to 7.44.0"
[platform/upstream/curl.git] / tests / data / test159
index 0bb4d89..e05ceef 100644 (file)
@@ -1,10 +1,20 @@
+<testcase>
+<info>
+<keywords>
+HTTP
+HTTP GET
+HTTP NTLM auth
+</keywords>
+</info>
+
 # Server-side
 <reply>
 
-# no <data> in this test since we have NTLM from the start
+<!-- no <data> in this test since we have NTLM from the start
+
+This is supposed to be returned when the server gets a first
+Authorization: NTLM line passed-in from the client -->
 
-# This is supposed to be returned when the server gets a first
-# Authorization: NTLM line passed-in from the client
 <data1001>
 HTTP/1.1 401 Now gimme that second request of crap\r
 Server: Microsoft-IIS/5.0\r
@@ -47,6 +57,8 @@ Finally, this is the real page!
 <client>
 <features>
 NTLM
+!SSPI
+debug
 </features>
 <server>
 http
@@ -54,9 +66,18 @@ http
  <name>
 HTTP with NTLM authorization when talking HTTP/1.0
  </name>
+ <setenv>
+# we force our own host name, in order to make the test machine independent
+CURL_GETHOSTNAME=curlhost
+# we try to use the LD_PRELOAD hack, if not a debug build
+LD_PRELOAD=%PWD/libtest/.libs/libhostname.so
+ </setenv>
  <command>
 http://%HOSTIP:%HTTPPORT/159 -u testuser:testpass --ntlm -0
 </command>
+<precheck>
+chkhostname curlhost
+</precheck>
 </client>
 
 # Verify data after the test has been "shot"
@@ -64,23 +85,19 @@ http://%HOSTIP:%HTTPPORT/159 -u testuser:testpass --ntlm -0
 <strip>
 ^User-Agent:.*
 </strip>
-# We strip off a large chunk of the type-2 NTLM message since it depends on
-# the local host name and thus differs on different machines!
-<strippart>
-s/^(Authorization: NTLM TlRMTVNTUAADAAAAGAAYAEAAAAAYABgAWAAAAAAAAABwAAAACAAIAHAAAAA).*/$1/
-</strippart>
 <protocol>
 GET /159 HTTP/1.0\r
 Authorization: NTLM TlRMTVNTUAABAAAABoIIAAAAAAAAAAAAAAAAAAAAAAA=\r
 User-Agent: curl/7.10.6-pre1 (i686-pc-linux-gnu) libcurl/7.10.6-pre1 OpenSSL/0.9.7a ipv6 zlib/1.1.3\r
-Host: 127.0.0.1:%HTTPPORT\r
+Host: %HOSTIP:%HTTPPORT\r
 Accept: */*\r
 \r
 GET /159 HTTP/1.0\r
-Authorization: NTLM TlRMTVNTUAADAAAAGAAYAEAAAAAYABgAWAAAAAAAAABwAAAACAAIAHAAAAA
+Authorization: NTLM TlRMTVNTUAADAAAAGAAYAEAAAACeAJ4AWAAAAAAAAAD2AAAACAAIAPYAAAAIAAgA/gAAAAAAAAAAAAAABoKBAL9LNW5+nkyHZRmyFaL/LJ4xMjM0MjIzNGUCyhgQ9hw6eWAT13EbDa0BAQAAAAAAAACAPtXesZ0BMTIzNDIyMzQAAAAAAgAEAEMAQwABABIARQBMAEkAUwBBAEIARQBUAEgABAAYAGMAYwAuAGkAYwBlAGQAZQB2AC4AbgB1AAMALABlAGwAaQBzAGEAYgBlAHQAaAAuAGMAYwAuAGkAYwBlAGQAZQB2AC4AbgB1AAAAAAAAAAAAdGVzdHVzZXJjdXJsaG9zdA==\r
 User-Agent: curl/7.10.6-pre1 (i686-pc-linux-gnu) libcurl/7.10.6-pre1 OpenSSL/0.9.7a ipv6 zlib/1.1.3\r
-Host: 127.0.0.1:%HTTPPORT\r
+Host: %HOSTIP:%HTTPPORT\r
 Accept: */*\r
 \r
 </protocol>
 </verify>
+</testcase>