summaryrefslogtreecommitdiff
path: root/tests/data
diff options
context:
space:
mode:
authorKamil Dudka <kdudka@redhat.com>2010-07-30 00:47:49 +0200
committerDaniel Stenberg <daniel@haxx.se>2010-07-30 00:51:24 +0200
commitb5c3feda1788301bea7f1dd4f9bb240d13862bd0 (patch)
tree50e6cbe63ec308b53d3bec11456b80832f94f634 /tests/data
parent01c309e186b3f1055d56211d4074f451bf5282bf (diff)
downloadcurl-b5c3feda1788301bea7f1dd4f9bb240d13862bd0.tar.gz
NTLM tests: boost coverage by forcing the hostname
A shared library tests/libtest/.libs/lihostname.so is preloaded in NTLM test-cases to override the system implementation of gethostname(). It makes it possible to test the NTLM authentication for exact match, and this way test the implementation of MD4 and DES. If LD_PRELOAD doesn't work, a debug build willl also workk as debug builds are now made to prefer a specific environment variable and will then return that content as host name instead of the actual one. Kamil wrote the bulk of this, Daniel Stenberg polished it.
Diffstat (limited to 'tests/data')
-rw-r--r--tests/data/test100816
-rw-r--r--tests/data/test102116
-rw-r--r--tests/data/test110016
-rw-r--r--tests/data/test15016
-rw-r--r--tests/data/test15516
-rw-r--r--tests/data/test15916
-rw-r--r--tests/data/test16916
-rw-r--r--tests/data/test20916
-rw-r--r--tests/data/test21316
-rw-r--r--tests/data/test23916
-rw-r--r--tests/data/test24316
-rw-r--r--tests/data/test26516
-rw-r--r--tests/data/test26716
-rw-r--r--tests/data/test54716
-rw-r--r--tests/data/test54816
-rw-r--r--tests/data/test5515
-rw-r--r--tests/data/test55514
-rw-r--r--tests/data/test6716
-rw-r--r--tests/data/test6816
-rw-r--r--tests/data/test6916
-rw-r--r--tests/data/test8116
-rw-r--r--tests/data/test8918
-rw-r--r--tests/data/test9018
-rw-r--r--tests/data/test9116
24 files changed, 232 insertions, 143 deletions
diff --git a/tests/data/test1008 b/tests/data/test1008
index 615444686..563a5c030 100644
--- a/tests/data/test1008
+++ b/tests/data/test1008
@@ -86,9 +86,18 @@ NTLM
<name>
HTTP proxy CONNECT auth NTLM with chunked-encoded 407 response
</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=./libtest/.libs/libhostname.so
+ </setenv>
<command>
http://test.remote.haxx.se:1008/path/10080002 --proxy http://%HOSTIP:%HTTPPORT --proxy-user silly:person --proxy-ntlm --proxytunnel
</command>
+<precheck>
+chkhostname curlhost
+</precheck>
</client>
# Verify data after the test has been "shot"
@@ -96,11 +105,6 @@ http://test.remote.haxx.se:1008/path/10080002 --proxy http://%HOSTIP:%HTTPPORT -
<strip>
^User-Agent: curl/.*
</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/^(Proxy-Authorization: NTLM TlRMTVNTUAADAAAAGAAYAEAAAAAYABgAWAAAAAAAAABwAAAABQAFAHAAAAA).*/$1/
-</strippart>
<protocol>
CONNECT test.remote.haxx.se:1008 HTTP/1.1
Host: test.remote.haxx.se:1008
@@ -109,7 +113,7 @@ Proxy-Connection: Keep-Alive
CONNECT test.remote.haxx.se:1008 HTTP/1.1
Host: test.remote.haxx.se:1008
-Proxy-Authorization: NTLM TlRMTVNTUAADAAAAGAAYAEAAAAAYABgAWAAAAAAAAABwAAAABQAFAHAAAAA
+Proxy-Authorization: NTLM TlRMTVNTUAADAAAAGAAYAEAAAAAYABgAWAAAAAAAAABwAAAABQAFAHAAAAAIAAgAdQAAAAAAAAAAAAAABoKBAKAeQjzKtCQ7ubW8S6MN7B59436GAxPu0CVROwwNBsgxML49gcbAXLT/bU+H5wrS9XNpbGx5Y3VybGhvc3Q=
Proxy-Connection: Keep-Alive
GET /path/10080002 HTTP/1.1
diff --git a/tests/data/test1021 b/tests/data/test1021
index 233cbc4db..0bc8af3cc 100644
--- a/tests/data/test1021
+++ b/tests/data/test1021
@@ -95,9 +95,18 @@ NTLM
<name>
HTTP proxy CONNECT with any proxyauth and proxy offers NTLM and close
</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=./libtest/.libs/libhostname.so
+ </setenv>
<command>
http://test.remote.haxx.se:1021/path/10210002 --proxy http://%HOSTIP:%HTTPPORT --proxy-user silly:person --proxy-anyauth --proxytunnel
</command>
+<precheck>
+chkhostname curlhost
+</precheck>
</client>
# Verify data after the test has been "shot"
@@ -105,11 +114,6 @@ http://test.remote.haxx.se:1021/path/10210002 --proxy http://%HOSTIP:%HTTPPORT -
<strip>
^User-Agent: curl/.*
</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/^(Proxy-Authorization: NTLM TlRMTVNTUAADAAAAGAAYAEAAAAAYABgAWAAAAAAAAABwAAAABQAFAHAAAAA).*/$1/
-</strippart>
<protocol>
CONNECT test.remote.haxx.se:1021 HTTP/1.1
Host: test.remote.haxx.se:1021
@@ -122,7 +126,7 @@ Proxy-Connection: Keep-Alive
CONNECT test.remote.haxx.se:1021 HTTP/1.1
Host: test.remote.haxx.se:1021
-Proxy-Authorization: NTLM TlRMTVNTUAADAAAAGAAYAEAAAAAYABgAWAAAAAAAAABwAAAABQAFAHAAAAA
+Proxy-Authorization: NTLM TlRMTVNTUAADAAAAGAAYAEAAAAAYABgAWAAAAAAAAABwAAAABQAFAHAAAAAIAAgAdQAAAAAAAAAAAAAABoKBAKAeQjzKtCQ7ubW8S6MN7B59436GAxPu0CVROwwNBsgxML49gcbAXLT/bU+H5wrS9XNpbGx5Y3VybGhvc3Q=
Proxy-Connection: Keep-Alive
GET /path/10210002 HTTP/1.1
diff --git a/tests/data/test1100 b/tests/data/test1100
index 40d9f641e..00bd64431 100644
--- a/tests/data/test1100
+++ b/tests/data/test1100
@@ -70,9 +70,18 @@ http
<name>
HTTP POST with NTLM authorization and following a 302 redirect
</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=./libtest/.libs/libhostname.so
+ </setenv>
<command>
http://%HOSTIP:%HTTPPORT/1100 -u testuser:testpass --ntlm -L -d "stuff to send away"
</command>
+<precheck>
+chkhostname curlhost
+</precheck>
</client>
# Verify data after the test has been "shot"
@@ -80,11 +89,6 @@ http://%HOSTIP:%HTTPPORT/1100 -u testuser:testpass --ntlm -L -d "stuff to send a
<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>
POST /1100 HTTP/1.1
Authorization: NTLM TlRMTVNTUAABAAAABoIIAAAAAAAAAAAAAAAAAAAAAAA=
@@ -95,7 +99,7 @@ Content-Length: 0
Content-Type: application/x-www-form-urlencoded
POST /1100 HTTP/1.1
-Authorization: NTLM TlRMTVNTUAADAAAAGAAYAEAAAAAYABgAWAAAAAAAAABwAAAACAAIAHAAAAA
+Authorization: NTLM TlRMTVNTUAADAAAAGAAYAEAAAAAYABgAWAAAAAAAAABwAAAACAAIAHAAAAAIAAgAeAAAAAAAAAAAAAAABoKBAFpkQwKRCZFMhjj0tw47wEjKHRHlvzfxQamFcheMuv8v+xeqphEO5V41xRd7R9deOXRlc3R1c2VyY3VybGhvc3Q=
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
Host: %HOSTIP:%HTTPPORT
Accept: */*
diff --git a/tests/data/test150 b/tests/data/test150
index 8dcb3621a..fc922e2f2 100644
--- a/tests/data/test150
+++ b/tests/data/test150
@@ -57,9 +57,18 @@ http
<name>
HTTP with NTLM authorization and --fail
</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=./libtest/.libs/libhostname.so
+ </setenv>
<command>
http://%HOSTIP:%HTTPPORT/150 -u testuser:testpass --ntlm --fail
</command>
+<precheck>
+chkhostname curlhost
+</precheck>
</client>
# Verify data after the test has been "shot"
@@ -67,11 +76,6 @@ http://%HOSTIP:%HTTPPORT/150 -u testuser:testpass --ntlm --fail
<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 /150 HTTP/1.1
Authorization: NTLM TlRMTVNTUAABAAAABoIIAAAAAAAAAAAAAAAAAAAAAAA=
@@ -80,7 +84,7 @@ Host: %HOSTIP:%HTTPPORT
Accept: */*
GET /150 HTTP/1.1
-Authorization: NTLM TlRMTVNTUAADAAAAGAAYAEAAAAAYABgAWAAAAAAAAABwAAAACAAIAHAAAAA
+Authorization: NTLM TlRMTVNTUAADAAAAGAAYAEAAAAAYABgAWAAAAAAAAABwAAAACAAIAHAAAAAIAAgAeAAAAAAAAAAAAAAABoKBAFpkQwKRCZFMhjj0tw47wEjKHRHlvzfxQamFcheMuv8v+xeqphEO5V41xRd7R9deOXRlc3R1c2VyY3VybGhvc3Q=
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
Host: %HOSTIP:%HTTPPORT
Accept: */*
diff --git a/tests/data/test155 b/tests/data/test155
index 5d228db62..53ee1dbbd 100644
--- a/tests/data/test155
+++ b/tests/data/test155
@@ -75,9 +75,18 @@ http
<name>
HTTP PUT with --anyauth authorization (picking NTLM)
</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=./libtest/.libs/libhostname.so
+ </setenv>
<command>
http://%HOSTIP:%HTTPPORT/155 -T log/put155 -u testuser:testpass --anyauth
</command>
+<precheck>
+chkhostname curlhost
+</precheck>
<file name="log/put155">
This is data we upload with PUT
a second line
@@ -91,11 +100,6 @@ four is the number of lines
<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>
PUT /155 HTTP/1.1
Host: %HOSTIP:%HTTPPORT
@@ -111,7 +115,7 @@ Content-Length: 0
Expect: 100-continue
PUT /155 HTTP/1.1
-Authorization: NTLM TlRMTVNTUAADAAAAGAAYAEAAAAAYABgAWAAAAAAAAABwAAAACAAIAHAAAAA
+Authorization: NTLM TlRMTVNTUAADAAAAGAAYAEAAAAAYABgAWAAAAAAAAABwAAAACAAIAHAAAAAIAAgAeAAAAAAAAAAAAAAABoKBAFpkQwKRCZFMhjj0tw47wEjKHRHlvzfxQamFcheMuv8v+xeqphEO5V41xRd7R9deOXRlc3R1c2VyY3VybGhvc3Q=
User-Agent: curl/7.10.5 (i686-pc-linux-gnu) libcurl/7.10.5 OpenSSL/0.9.7a ipv6 zlib/1.1.3
Host: %HOSTIP:%HTTPPORT
Accept: */*
diff --git a/tests/data/test159 b/tests/data/test159
index 3b018212a..ede462492 100644
--- a/tests/data/test159
+++ b/tests/data/test159
@@ -56,9 +56,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=./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"
@@ -66,11 +75,6 @@ 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
Authorization: NTLM TlRMTVNTUAABAAAABoIIAAAAAAAAAAAAAAAAAAAAAAA=
@@ -79,7 +83,7 @@ Host: %HOSTIP:%HTTPPORT
Accept: */*
GET /159 HTTP/1.0
-Authorization: NTLM TlRMTVNTUAADAAAAGAAYAEAAAAAYABgAWAAAAAAAAABwAAAACAAIAHAAAAA
+Authorization: NTLM TlRMTVNTUAADAAAAGAAYAEAAAAAYABgAWAAAAAAAAABwAAAACAAIAHAAAAAIAAgAeAAAAAAAAAAAAAAABoKBAFpkQwKRCZFMhjj0tw47wEjKHRHlvzfxQamFcheMuv8v+xeqphEO5V41xRd7R9deOXRlc3R1c2VyY3VybGhvc3Q=
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
Host: %HOSTIP:%HTTPPORT
Accept: */*
diff --git a/tests/data/test169 b/tests/data/test169
index 0ad2f8808..5af7f9f5c 100644
--- a/tests/data/test169
+++ b/tests/data/test169
@@ -81,9 +81,18 @@ NTLM
<name>
HTTP with proxy-requiring-NTLM to site-requiring-Digest
</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=./libtest/.libs/libhostname.so
+ </setenv>
<command>
http://data.from.server.requiring.digest.hohoho.com/169 --proxy http://%HOSTIP:%HTTPPORT --proxy-user foo:bar --proxy-ntlm --digest --user digest:alot
</command>
+<precheck>
+chkhostname curlhost
+</precheck>
</client>
# Verify data after the test has been "shot"
@@ -91,11 +100,6 @@ http://data.from.server.requiring.digest.hohoho.com/169 --proxy http://%HOSTIP:%
<strip>
^User-Agent: curl/.*
</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/^(Proxy-Authorization: NTLM TlRMTVNTUAADAAAAGAAYAEAAAAAYABgAWAAAAAAAAABwAAAAAwADAHAAAAA).*/$1/
-</strippart>
<protocol>
GET http://data.from.server.requiring.digest.hohoho.com/169 HTTP/1.1
Proxy-Authorization: NTLM TlRMTVNTUAABAAAABoIIAAAAAAAAAAAAAAAAAAAAAAA=
@@ -105,7 +109,7 @@ Accept: */*
Proxy-Connection: Keep-Alive
GET http://data.from.server.requiring.digest.hohoho.com/169 HTTP/1.1
-Proxy-Authorization: NTLM TlRMTVNTUAADAAAAGAAYAEAAAAAYABgAWAAAAAAAAABwAAAAAwADAHAAAAA
+Proxy-Authorization: NTLM TlRMTVNTUAADAAAAGAAYAEAAAAAYABgAWAAAAAAAAABwAAAAAwADAHAAAAAIAAgAcwAAAAAAAAAAAAAABoKBAIP6B+XVQ6vQsx3DfDXUVhd9436GAxPu0IYcl2Z7LxHmNeOAWQ+vxUmhuCFJBUgXCWZvb2N1cmxob3N0
User-Agent: curl/7.12.0-CVS (i686-pc-linux-gnu) libcurl/7.12.0-CVS OpenSSL/0.9.6b ipv6 zlib/1.1.4 GSS libidn/0.4.3
Host: data.from.server.requiring.digest.hohoho.com
Accept: */*
diff --git a/tests/data/test209 b/tests/data/test209
index ef372c4de..e27b6e38b 100644
--- a/tests/data/test209
+++ b/tests/data/test209
@@ -79,9 +79,18 @@ NTLM
<name>
HTTP proxy CONNECT auth NTLM
</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=./libtest/.libs/libhostname.so
+ </setenv>
<command>
http://test.remote.haxx.se:209/path/2090002 --proxy http://%HOSTIP:%HTTPPORT --proxy-user silly:person --proxy-ntlm --proxytunnel
</command>
+<precheck>
+chkhostname curlhost
+</precheck>
</client>
# Verify data after the test has been "shot"
@@ -89,11 +98,6 @@ http://test.remote.haxx.se:209/path/2090002 --proxy http://%HOSTIP:%HTTPPORT --p
<strip>
^User-Agent: curl/.*
</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/^(Proxy-Authorization: NTLM TlRMTVNTUAADAAAAGAAYAEAAAAAYABgAWAAAAAAAAABwAAAABQAFAHAAAAA).*/$1/
-</strippart>
<protocol>
CONNECT test.remote.haxx.se:209 HTTP/1.1
Host: test.remote.haxx.se:209
@@ -102,7 +106,7 @@ Proxy-Connection: Keep-Alive
CONNECT test.remote.haxx.se:209 HTTP/1.1
Host: test.remote.haxx.se:209
-Proxy-Authorization: NTLM TlRMTVNTUAADAAAAGAAYAEAAAAAYABgAWAAAAAAAAABwAAAABQAFAHAAAAA
+Proxy-Authorization: NTLM TlRMTVNTUAADAAAAGAAYAEAAAAAYABgAWAAAAAAAAABwAAAABQAFAHAAAAAIAAgAdQAAAAAAAAAAAAAABoKBAKAeQjzKtCQ7ubW8S6MN7B59436GAxPu0CVROwwNBsgxML49gcbAXLT/bU+H5wrS9XNpbGx5Y3VybGhvc3Q=
Proxy-Connection: Keep-Alive
GET /path/2090002 HTTP/1.1
diff --git a/tests/data/test213 b/tests/data/test213
index 801d9e7ad..8bab38783 100644
--- a/tests/data/test213
+++ b/tests/data/test213
@@ -79,9 +79,18 @@ NTLM
<name>
HTTP 1.0 proxy CONNECT auth NTLM and then POST
</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=./libtest/.libs/libhostname.so
+ </setenv>
<command>
http://test.remote.haxx.se:213/path/2130002 --proxy1.0 http://%HOSTIP:%HTTPPORT --proxy-user silly:person --proxy-ntlm --proxytunnel -d "postit"
</command>
+<precheck>
+chkhostname curlhost
+</precheck>
</client>
# Verify data after the test has been "shot"
@@ -89,11 +98,6 @@ http://test.remote.haxx.se:213/path/2130002 --proxy1.0 http://%HOSTIP:%HTTPPORT
<strip>
^User-Agent: curl/.*
</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/^(Proxy-Authorization: NTLM TlRMTVNTUAADAAAAGAAYAEAAAAAYABgAWAAAAAAAAABwAAAABQAFAHAAAAA).*/$1/
-</strippart>
<protocol nonewline="yes">
CONNECT test.remote.haxx.se:213 HTTP/1.0
Host: test.remote.haxx.se:213
@@ -102,7 +106,7 @@ Proxy-Connection: Keep-Alive
CONNECT test.remote.haxx.se:213 HTTP/1.0
Host: test.remote.haxx.se:213
-Proxy-Authorization: NTLM TlRMTVNTUAADAAAAGAAYAEAAAAAYABgAWAAAAAAAAABwAAAABQAFAHAAAAA
+Proxy-Authorization: NTLM TlRMTVNTUAADAAAAGAAYAEAAAAAYABgAWAAAAAAAAABwAAAABQAFAHAAAAAIAAgAdQAAAAAAAAAAAAAABoKBAKAeQjzKtCQ7ubW8S6MN7B59436GAxPu0CVROwwNBsgxML49gcbAXLT/bU+H5wrS9XNpbGx5Y3VybGhvc3Q=
Proxy-Connection: Keep-Alive
POST /path/2130002 HTTP/1.1
diff --git a/tests/data/test239 b/tests/data/test239
index 2674b8e3a..e88908989 100644
--- a/tests/data/test239
+++ b/tests/data/test239
@@ -56,9 +56,18 @@ NTLM
<name>
HTTP proxy-auth NTLM and then POST
</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=./libtest/.libs/libhostname.so
+ </setenv>
<command>
http://%HOSTIP:%HTTPPORT/239 --proxy http://%HOSTIP:%HTTPPORT --proxy-user silly:person --proxy-ntlm -d "postit"
</command>
+<precheck>
+chkhostname curlhost
+</precheck>
</client>
# Verify data after the test has been "shot"
@@ -66,11 +75,6 @@ http://%HOSTIP:%HTTPPORT/239 --proxy http://%HOSTIP:%HTTPPORT --proxy-user silly
<strip>
^User-Agent: curl/.*
</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/^(Proxy-Authorization: NTLM TlRMTVNTUAADAAAAGAAYAEAAAAAYABgAWAAAAAAAAABwAAAABQAFAHAAAAA).*/$1/
-</strippart>
<protocol nonewline="yes">
POST http://%HOSTIP:%HTTPPORT/239 HTTP/1.1
Proxy-Authorization: NTLM TlRMTVNTUAABAAAABoIIAAAAAAAAAAAAAAAAAAAAAAA=
@@ -82,7 +86,7 @@ Content-Length: 0
Content-Type: application/x-www-form-urlencoded
POST http://%HOSTIP:%HTTPPORT/239 HTTP/1.1
-Proxy-Authorization: NTLM TlRMTVNTUAADAAAAGAAYAEAAAAAYABgAWAAAAAAAAABwAAAABQAFAHAAAAA
+Proxy-Authorization: NTLM TlRMTVNTUAADAAAAGAAYAEAAAAAYABgAWAAAAAAAAABwAAAABQAFAHAAAAAIAAgAdQAAAAAAAAAAAAAABoKBAKAeQjzKtCQ7ubW8S6MN7B59436GAxPu0CVROwwNBsgxML49gcbAXLT/bU+H5wrS9XNpbGx5Y3VybGhvc3Q=
User-Agent: curl/7.13.2-CVS (i686-pc-linux-gnu) libcurl/7.13.2-CVS OpenSSL/0.9.7e zlib/1.2.2 libidn/0.5.13
Host: %HOSTIP:%HTTPPORT
Accept: */*
diff --git a/tests/data/test243 b/tests/data/test243
index f24fd7717..3effb8202 100644
--- a/tests/data/test243
+++ b/tests/data/test243
@@ -77,9 +77,18 @@ NTLM
<name>
HTTP POST with --proxy-anyauth, picking NTLM
</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=./libtest/.libs/libhostname.so
+ </setenv>
<command>
http://%HOSTIP:%HTTPPORT/243 --proxy http://%HOSTIP:%HTTPPORT --proxy-user silly:person --proxy-anyauth -d "postit"
</command>
+<precheck>
+chkhostname curlhost
+</precheck>
</client>
# Verify data after the test has been "shot"
@@ -87,11 +96,6 @@ http://%HOSTIP:%HTTPPORT/243 --proxy http://%HOSTIP:%HTTPPORT --proxy-user silly
<strip>
^User-Agent: curl/.*
</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/^(Proxy-Authorization: NTLM TlRMTVNTUAADAAAAGAAYAEAAAAAYABgAWAAAAAAAAABwAAAABQAFAHAAAAA).*/$1/
-</strippart>
<protocol nonewline="yes">
POST http://%HOSTIP:%HTTPPORT/243 HTTP/1.1
User-Agent: curl/7.13.2-CVS (i686-pc-linux-gnu) libcurl/7.13.2-CVS OpenSSL/0.9.7e zlib/1.2.2 libidn/0.5.13
@@ -111,7 +115,7 @@ Content-Length: 0
Content-Type: application/x-www-form-urlencoded
POST http://%HOSTIP:%HTTPPORT/243 HTTP/1.1
-Proxy-Authorization: NTLM TlRMTVNTUAADAAAAGAAYAEAAAAAYABgAWAAAAAAAAABwAAAABQAFAHAAAAA
+Proxy-Authorization: NTLM TlRMTVNTUAADAAAAGAAYAEAAAAAYABgAWAAAAAAAAABwAAAABQAFAHAAAAAIAAgAdQAAAAAAAAAAAAAABoKBAKAeQjzKtCQ7ubW8S6MN7B59436GAxPu0CVROwwNBsgxML49gcbAXLT/bU+H5wrS9XNpbGx5Y3VybGhvc3Q=
User-Agent: curl/7.13.2-CVS (i686-pc-linux-gnu) libcurl/7.13.2-CVS OpenSSL/0.9.7e zlib/1.2.2 libidn/0.5.13
Host: %HOSTIP:%HTTPPORT
Accept: */*
diff --git a/tests/data/test265 b/tests/data/test265
index bd8a24c0a..e47dbe8e7 100644
--- a/tests/data/test265
+++ b/tests/data/test265
@@ -82,9 +82,18 @@ NTLM
<name>
HTTP proxy CONNECT auth NTLM and then POST, response-body in the 407
</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=./libtest/.libs/libhostname.so
+ </setenv>
<command>
http://test.remote.haxx.se:265/path/2650002 --proxy http://%HOSTIP:%HTTPPORT --proxy-user silly:person --proxy-ntlm --proxytunnel -d "postit"
</command>
+<precheck>
+chkhostname curlhost
+</precheck>
</client>
# Verify data after the test has been "shot"
@@ -92,11 +101,6 @@ http://test.remote.haxx.se:265/path/2650002 --proxy http://%HOSTIP:%HTTPPORT --p
<strip>
^User-Agent: curl/.*
</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/^(Proxy-Authorization: NTLM TlRMTVNTUAADAAAAGAAYAEAAAAAYABgAWAAAAAAAAABwAAAABQAFAHAAAAA).*/$1/
-</strippart>
<protocol nonewline="yes">
CONNECT test.remote.haxx.se:265 HTTP/1.1
Host: test.remote.haxx.se:265
@@ -105,7 +109,7 @@ Proxy-Connection: Keep-Alive
CONNECT test.remote.haxx.se:265 HTTP/1.1
Host: test.remote.haxx.se:265
-Proxy-Authorization: NTLM TlRMTVNTUAADAAAAGAAYAEAAAAAYABgAWAAAAAAAAABwAAAABQAFAHAAAAA
+Proxy-Authorization: NTLM TlRMTVNTUAADAAAAGAAYAEAAAAAYABgAWAAAAAAAAABwAAAABQAFAHAAAAAIAAgAdQAAAAAAAAAAAAAABoKBAKAeQjzKtCQ7ubW8S6MN7B59436GAxPu0CVROwwNBsgxML49gcbAXLT/bU+H5wrS9XNpbGx5Y3VybGhvc3Q=
Proxy-Connection: Keep-Alive
POST /path/2650002 HTTP/1.1
diff --git a/tests/data/test267 b/tests/data/test267
index 4e356b685..aa61b357b 100644
--- a/tests/data/test267
+++ b/tests/data/test267
@@ -63,9 +63,18 @@ http
<name>
HTTP POST with NTLM authorization and added custom headers
</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=./libtest/.libs/libhostname.so
+ </setenv>
<command>
http://%HOSTIP:%HTTPPORT/267 -u testuser:testpass --ntlm -d "data" -H "Header1: yes" -H "Header2: no"
</command>
+<precheck>
+chkhostname curlhost
+</precheck>
</client>
# Verify data after the test has been "shot"
@@ -73,11 +82,6 @@ http://%HOSTIP:%HTTPPORT/267 -u testuser:testpass --ntlm -d "data" -H "Header1:
<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 nonewline="yes">
POST /267 HTTP/1.1
Authorization: NTLM TlRMTVNTUAABAAAABoIIAAAAAAAAAAAAAAAAAAAAAAA=
@@ -90,7 +94,7 @@ Content-Length: 0
Content-Type: application/x-www-form-urlencoded
POST /267 HTTP/1.1
-Authorization: NTLM TlRMTVNTUAADAAAAGAAYAEAAAAAYABgAWAAAAAAAAABwAAAACAAIAHAAAAA
+Authorization: NTLM TlRMTVNTUAADAAAAGAAYAEAAAAAYABgAWAAAAAAAAABwAAAACAAIAHAAAAAIAAgAeAAAAAAAAAAAAAAABoKBAFpkQwKRCZFMhjj0tw47wEjKHRHlvzfxQamFcheMuv8v+xeqphEO5V41xRd7R9deOXRlc3R1c2VyY3VybGhvc3Q=
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
Host: %HOSTIP:%HTTPPORT
Accept: */*
diff --git a/tests/data/test547 b/tests/data/test547
index d2e9d9ea1..8ac0c9dd5 100644
--- a/tests/data/test547
+++ b/tests/data/test547
@@ -80,9 +80,18 @@ NTLM
<name>
HTTP proxy auth NTLM with POST data from read callback
</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=./libtest/.libs/libhostname.so
+ </setenv>
<command>
http://test.remote.haxx.se/path/547 http://%HOSTIP:%HTTPPORT s1lly:pers0n
</command>
+<precheck>
+chkhostname curlhost
+</precheck>
</client>
# Verify data after the test has been "shot"
@@ -90,11 +99,6 @@ http://test.remote.haxx.se/path/547 http://%HOSTIP:%HTTPPORT s1lly:pers0n
<strip>
^User-Agent: curl/.*
</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/^(Proxy-Authorization: NTLM TlRMTVNTUAADAAAAGAAYAEAAAAAYABgAWAAAAAAAAABwAAAABQAFAHAAAAA).*/$1/
-</strippart>
<protocol>
POST http://test.remote.haxx.se/path/547 HTTP/1.1
User-Agent: curl/7.13.2-CVS (i686-pc-linux-gnu) libcurl/7.13.2-CVS OpenSSL/0.9.7e zlib/1.2.2 libidn/0.5.13
@@ -115,7 +119,7 @@ Content-Length: 0
Content-Type: application/x-www-form-urlencoded
POST http://test.remote.haxx.se/path/547 HTTP/1.1
-Proxy-Authorization: NTLM TlRMTVNTUAADAAAAGAAYAEAAAAAYABgAWAAAAAAAAABwAAAABQAFAHAAAAA
+Proxy-Authorization: NTLM TlRMTVNTUAADAAAAGAAYAEAAAAAYABgAWAAAAAAAAABwAAAABQAFAHAAAAAIAAgAdQAAAAAAAAAAAAAABoKBAIYrD1xJmhNBNL9fLzuk9PV9436GAxPu0EKWzqQ/sZDVLXnp1JrySgl8A+cibE6z4HMxbGx5Y3VybGhvc3Q=
User-Agent: curl/7.13.2-CVS (i686-pc-linux-gnu) libcurl/7.13.2-CVS OpenSSL/0.9.7e zlib/1.2.2 libidn/0.5.13
Host: test.remote.haxx.se
Accept: */*
diff --git a/tests/data/test548 b/tests/data/test548
index 215b44fd9..d811fcaeb 100644
--- a/tests/data/test548
+++ b/tests/data/test548
@@ -80,9 +80,18 @@ NTLM
<name>
HTTP proxy auth NTLM with POST data from CURLOPT_POSTFIELDS
</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=./libtest/.libs/libhostname.so
+ </setenv>
<command>
http://test.remote.haxx.se/path/548 http://%HOSTIP:%HTTPPORT s1lly:pers0n
</command>
+<precheck>
+chkhostname curlhost
+</precheck>
</client>
# Verify data after the test has been "shot"
@@ -90,11 +99,6 @@ http://test.remote.haxx.se/path/548 http://%HOSTIP:%HTTPPORT s1lly:pers0n
<strip>
^User-Agent: curl/.*
</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/^(Proxy-Authorization: NTLM TlRMTVNTUAADAAAAGAAYAEAAAAAYABgAWAAAAAAAAABwAAAABQAFAHAAAAA).*/$1/
-</strippart>
<protocol>
POST http://test.remote.haxx.se/path/548 HTTP/1.1
User-Agent: curl/7.13.2-CVS (i686-pc-linux-gnu) libcurl/7.13.2-CVS OpenSSL/0.9.7e zlib/1.2.2 libidn/0.5.13
@@ -115,7 +119,7 @@ Content-Length: 0
Content-Type: application/x-www-form-urlencoded
POST http://test.remote.haxx.se/path/548 HTTP/1.1
-Proxy-Authorization: NTLM TlRMTVNTUAADAAAAGAAYAEAAAAAYABgAWAAAAAAAAABwAAAABQAFAHAAAAA
+Proxy-Authorization: NTLM TlRMTVNTUAADAAAAGAAYAEAAAAAYABgAWAAAAAAAAABwAAAABQAFAHAAAAAIAAgAdQAAAAAAAAAAAAAABoKBAIYrD1xJmhNBNL9fLzuk9PV9436GAxPu0EKWzqQ/sZDVLXnp1JrySgl8A+cibE6z4HMxbGx5Y3VybGhvc3Q=
User-Agent: curl/7.13.2-CVS (i686-pc-linux-gnu) libcurl/7.13.2-CVS OpenSSL/0.9.7e zlib/1.2.2 libidn/0.5.13
Host: test.remote.haxx.se
Accept: */*
diff --git a/tests/data/test551 b/tests/data/test551
index 28b5af5a7..8027d91cf 100644
--- a/tests/data/test551
+++ b/tests/data/test551
@@ -75,11 +75,6 @@ http://test.remote.haxx.se/path/551 http://%HOSTIP:%HTTPPORT s1lly:pers0n
<strip>
^User-Agent: curl/.*
</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/^(Proxy-Authorization: NTLM TlRMTVNTUAADAAAAGAAYAEAAAAAYABgAWAAAAAAAAABwAAAABQAFAHAAAAA).*/$1/
-</strippart>
<protocol>
POST http://test.remote.haxx.se/path/551 HTTP/1.1
Host: test.remote.haxx.se
diff --git a/tests/data/test555 b/tests/data/test555
index d433569c0..74dc210b1 100644
--- a/tests/data/test555
+++ b/tests/data/test555
@@ -85,9 +85,18 @@ NTLM
<name>
HTTP proxy auth NTLM with POST data from read callback multi-if
</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=./libtest/.libs/libhostname.so
+ </setenv>
<command>
http://test.remote.haxx.se/path/555 http://%HOSTIP:%HTTPPORT s1lly:pers0n
</command>
+<precheck>
+chkhostname curlhost
+</precheck>
</client>
# Verify data after the test has been "shot"
@@ -95,10 +104,7 @@ http://test.remote.haxx.se/path/555 http://%HOSTIP:%HTTPPORT s1lly:pers0n
<strip>
^User-Agent: curl/.*
</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/^(Proxy-Authorization: NTLM TlRMTVNTUAADAAAAGAAYAEAAAAAYABgAWAAAAAAAAABwAAAABQAFAHAAAAA).*/$1/
# remove CR that CURLOPT_TRANSFERTEXT added, when CharConv enabled:
s/^(this is the blurb we want to upload)\r\n/$1\n/ if($has_charconv)
</strippart>
@@ -122,7 +128,7 @@ Content-Length: 0
Content-Type: application/x-www-form-urlencoded
POST http://test.remote.haxx.se/path/555 HTTP/1.1
-Proxy-Authorization: NTLM TlRMTVNTUAADAAAAGAAYAEAAAAAYABgAWAAAAAAAAABwAAAABQAFAHAAAAA
+Proxy-Authorization: NTLM TlRMTVNTUAADAAAAGAAYAEAAAAAYABgAWAAAAAAAAABwAAAABQAFAHAAAAAIAAgAdQAAAAAAAAAAAAAABoKBAIYrD1xJmhNBNL9fLzuk9PV9436GAxPu0EKWzqQ/sZDVLXnp1JrySgl8A+cibE6z4HMxbGx5Y3VybGhvc3Q=
User-Agent: curl/7.13.2-CVS (i686-pc-linux-gnu) libcurl/7.13.2-CVS OpenSSL/0.9.7e zlib/1.2.2 libidn/0.5.13
Host: test.remote.haxx.se
Accept: */*
diff --git a/tests/data/test67 b/tests/data/test67
index 46d120b13..d6d60efe7 100644
--- a/tests/data/test67
+++ b/tests/data/test67
@@ -63,9 +63,18 @@ http
<name>
HTTP with NTLM authorization
</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=./libtest/.libs/libhostname.so
+ </setenv>
<command>
http://%HOSTIP:%HTTPPORT/67 -u testuser:testpass --ntlm
</command>
+<precheck>
+chkhostname curlhost
+</precheck>
</client>
# Verify data after the test has been "shot"
@@ -73,11 +82,6 @@ http://%HOSTIP:%HTTPPORT/67 -u testuser:testpass --ntlm
<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 /67 HTTP/1.1
Authorization: NTLM TlRMTVNTUAABAAAABoIIAAAAAAAAAAAAAAAAAAAAAAA=
@@ -86,7 +90,7 @@ Host: %HOSTIP:%HTTPPORT
Accept: */*
GET /67 HTTP/1.1
-Authorization: NTLM TlRMTVNTUAADAAAAGAAYAEAAAAAYABgAWAAAAAAAAABwAAAACAAIAHAAAAA
+Authorization: NTLM TlRMTVNTUAADAAAAGAAYAEAAAAAYABgAWAAAAAAAAABwAAAACAAIAHAAAAAIAAgAeAAAAAAAAAAAAAAABoKBAFpkQwKRCZFMhjj0tw47wEjKHRHlvzfxQamFcheMuv8v+xeqphEO5V41xRd7R9deOXRlc3R1c2VyY3VybGhvc3Q=
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
Host: %HOSTIP:%HTTPPORT
Accept: */*
diff --git a/tests/data/test68 b/tests/data/test68
index 9cceaf7a2..5b79a7a98 100644
--- a/tests/data/test68
+++ b/tests/data/test68
@@ -62,9 +62,18 @@ http
<name>
HTTP with NTLM authorization and wrong password
</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=./libtest/.libs/libhostname.so
+ </setenv>
<command>
http://%HOSTIP:%HTTPPORT/68 -u testuser:testpass --ntlm
</command>
+<precheck>
+chkhostname curlhost
+</precheck>
</client>
# Verify data after the test has been "shot"
@@ -72,11 +81,6 @@ http://%HOSTIP:%HTTPPORT/68 -u testuser:testpass --ntlm
<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 /68 HTTP/1.1
Authorization: NTLM TlRMTVNTUAABAAAABoIIAAAAAAAAAAAAAAAAAAAAAAA=
@@ -85,7 +89,7 @@ Host: %HOSTIP:%HTTPPORT
Accept: */*
GET /68 HTTP/1.1
-Authorization: NTLM TlRMTVNTUAADAAAAGAAYAEAAAAAYABgAWAAAAAAAAABwAAAACAAIAHAAAAA
+Authorization: NTLM TlRMTVNTUAADAAAAGAAYAEAAAAAYABgAWAAAAAAAAABwAAAACAAIAHAAAAAIAAgAeAAAAAAAAAAAAAAABoKBAFpkQwKRCZFMhjj0tw47wEjKHRHlvzfxQamFcheMuv8v+xeqphEO5V41xRd7R9deOXRlc3R1c2VyY3VybGhvc3Q=
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
Host: %HOSTIP:%HTTPPORT
Accept: */*
diff --git a/tests/data/test69 b/tests/data/test69
index 1bf0f735f..d6b8de62c 100644
--- a/tests/data/test69
+++ b/tests/data/test69
@@ -79,9 +79,18 @@ http
<name>
HTTP with NTLM, Basic or Wild-and-crazy authorization
</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=./libtest/.libs/libhostname.so
+ </setenv>
<command>
http://%HOSTIP:%HTTPPORT/69 -u testuser:testpass --anyauth
</command>
+<precheck>
+chkhostname curlhost
+</precheck>
</client>
# Verify data after the test has been "shot"
@@ -89,11 +98,6 @@ http://%HOSTIP:%HTTPPORT/69 -u testuser:testpass --anyauth
<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 /69 HTTP/1.1
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
@@ -107,7 +111,7 @@ Host: %HOSTIP:%HTTPPORT
Accept: */*
GET /69 HTTP/1.1
-Authorization: NTLM TlRMTVNTUAADAAAAGAAYAEAAAAAYABgAWAAAAAAAAABwAAAACAAIAHAAAAA
+Authorization: NTLM TlRMTVNTUAADAAAAGAAYAEAAAAAYABgAWAAAAAAAAABwAAAACAAIAHAAAAAIAAgAeAAAAAAAAAAAAAAABoKBAFpkQwKRCZFMhjj0tw47wEjKHRHlvzfxQamFcheMuv8v+xeqphEO5V41xRd7R9deOXRlc3R1c2VyY3VybGhvc3Q=
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
Host: %HOSTIP:%HTTPPORT
Accept: */*
diff --git a/tests/data/test81 b/tests/data/test81
index 9a12cc1a7..47b37e963 100644
--- a/tests/data/test81
+++ b/tests/data/test81
@@ -62,9 +62,18 @@ http
<name>
HTTP with proxy using NTLM authorization
</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=./libtest/.libs/libhostname.so
+ </setenv>
<command>
http://%HOSTIP:%HTTPPORT/81 --proxy-user testuser:testpass -x http://%HOSTIP:%HTTPPORT --proxy-ntlm
</command>
+<precheck>
+chkhostname curlhost
+</precheck>
</client>
# Verify data after the test has been "shot"
@@ -72,11 +81,6 @@ http://%HOSTIP:%HTTPPORT/81 --proxy-user testuser:testpass -x http://%HOSTIP:%HT
<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 http://%HOSTIP:%HTTPPORT/81 HTTP/1.1
Proxy-Authorization: NTLM TlRMTVNTUAABAAAABoIIAAAAAAAAAAAAAAAAAAAAAAA=
@@ -86,7 +90,7 @@ Accept: */*
Proxy-Connection: Keep-Alive
GET http://%HOSTIP:%HTTPPORT/81 HTTP/1.1
-Proxy-Authorization: NTLM TlRMTVNTUAADAAAAGAAYAEAAAAAYABgAWAAAAAAAAABwAAAACAAIAHAAAAA
+Proxy-Authorization: NTLM TlRMTVNTUAADAAAAGAAYAEAAAAAYABgAWAAAAAAAAABwAAAACAAIAHAAAAAIAAgAeAAAAAAAAAAAAAAABoKBAFpkQwKRCZFMhjj0tw47wEjKHRHlvzfxQamFcheMuv8v+xeqphEO5V41xRd7R9deOXRlc3R1c2VyY3VybGhvc3Q=
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
Host: %HOSTIP:%HTTPPORT
Accept: */*
diff --git a/tests/data/test89 b/tests/data/test89
index 06effd1b7..3512fbe55 100644
--- a/tests/data/test89
+++ b/tests/data/test89
@@ -96,9 +96,18 @@ http
<name>
HTTP with NTLM and follow-location
</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=./libtest/.libs/libhostname.so
+ </setenv>
<command>
http://%HOSTIP:%HTTPPORT/89 -u testuser:testpass --ntlm -L
</command>
+<precheck>
+chkhostname curlhost
+</precheck>
</client>
# Verify data after the test has been "shot"
@@ -106,11 +115,6 @@ http://%HOSTIP:%HTTPPORT/89 -u testuser:testpass --ntlm -L
<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 /89 HTTP/1.1
Authorization: NTLM TlRMTVNTUAABAAAABoIIAAAAAAAAAAAAAAAAAAAAAAA=
@@ -119,7 +123,7 @@ Host: %HOSTIP:%HTTPPORT
Accept: */*
GET /89 HTTP/1.1
-Authorization: NTLM TlRMTVNTUAADAAAAGAAYAEAAAAAYABgAWAAAAAAAAABwAAAACAAIAHAAAAA
+Authorization: NTLM TlRMTVNTUAADAAAAGAAYAEAAAAAYABgAWAAAAAAAAABwAAAACAAIAHAAAAAIAAgAeAAAAAAAAAAAAAAABoKBAFpkQwKRCZFMhjj0tw47wEjKHRHlvzfxQamFcheMuv8v+xeqphEO5V41xRd7R9deOXRlc3R1c2VyY3VybGhvc3Q=
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
Host: %HOSTIP:%HTTPPORT
Accept: */*
@@ -131,7 +135,7 @@ Host: %HOSTIP:%HTTPPORT
Accept: */*
GET /you/890010 HTTP/1.1
-Authorization: NTLM TlRMTVNTUAADAAAAGAAYAEAAAAAYABgAWAAAAAAAAABwAAAACAAIAHAAAAA
+Authorization: NTLM TlRMTVNTUAADAAAAGAAYAEAAAAAYABgAWAAAAAAAAABwAAAACAAIAHAAAAAIAAgAeAAAAAAAAAAAAAAABoKBAFpkQwKRCZFMhjj0tw47wEjKHRHlvzfxQamFcheMuv8v+xeqphEO5V41xRd7R9deOXRlc3R1c2VyY3VybGhvc3Q=
User-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
Host: %HOSTIP:%HTTPPORT
Accept: */*
diff --git a/tests/data/test90 b/tests/data/test90
index 387608b5b..55c98f4a0 100644
--- a/tests/data/test90
+++ b/tests/data/test90
@@ -134,9 +134,18 @@ http
<name>
HTTP with NTLM via --anyauth, and then follow-location with NTLM again
</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=./libtest/.libs/libhostname.so
+ </setenv>
<command>
http://%HOSTIP:%HTTPPORT/90 -u testuser:testpass --anyauth -L
</command>
+<precheck>
+chkhostname curlhost
+</precheck>
</client>
# Verify data after the test has been "shot"
@@ -144,11 +153,6 @@ http://%HOSTIP:%HTTPPORT/90 -u testuser:testpass --anyauth -L
<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 /90 HTTP/1.1
Host: %HOSTIP:%HTTPPORT
@@ -161,7 +165,7 @@ Host: %HOSTIP:%HTTPPORT
Accept: */*
GET /90 HTTP/1.1
-Authorization: NTLM TlRMTVNTUAADAAAAGAAYAEAAAAAYABgAWAAAAAAAAABwAAAACAAIAHAAAAA
+Authorization: NTLM TlRMTVNTUAADAAAAGAAYAEAAAAAYABgAWAAAAAAAAABwAAAACAAIAHAAAAAIAAgAeAAAAAAAAAAAAAAABoKBAFpkQwKRCZFMhjj0tw47wEjKHRHlvzfxQamFcheMuv8v+xeqphEO5V41xRd7R9deOXRlc3R1c2VyY3VybGhvc3Q=
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
Host: %HOSTIP:%HTTPPORT
Accept: */*
@@ -177,7 +181,7 @@ Host: %HOSTIP:%HTTPPORT
Accept: */*
GET /you/900010 HTTP/1.1
-Authorization: NTLM TlRMTVNTUAADAAAAGAAYAEAAAAAYABgAWAAAAAAAAABwAAAACAAIAHAAAAA
+Authorization: NTLM TlRMTVNTUAADAAAAGAAYAEAAAAAYABgAWAAAAAAAAABwAAAACAAIAHAAAAAIAAgAeAAAAAAAAAAAAAAABoKBAFpkQwKRCZFMhjj0tw47wEjKHRHlvzfxQamFcheMuv8v+xeqphEO5V41xRd7R9deOXRlc3R1c2VyY3VybGhvc3Q=
User-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
Host: %HOSTIP:%HTTPPORT
Accept: */*
diff --git a/tests/data/test91 b/tests/data/test91
index e3b81b3b4..90ace92ed 100644
--- a/tests/data/test91
+++ b/tests/data/test91
@@ -80,9 +80,18 @@ http
<name>
HTTP with NTLM/Negotiate/Basic, anyauth and user with domain, with size 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=./libtest/.libs/libhostname.so
+ </setenv>
<command>
http://%HOSTIP:%HTTPPORT/91 --anyauth -u mydomain\\myself:secret
</command>
+<precheck>
+chkhostname curlhost
+</precheck>
</client>
# Verify data after the test has been "shot"
@@ -90,11 +99,6 @@ http://%HOSTIP:%HTTPPORT/91 --anyauth -u mydomain\\myself:secret
<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 TlRMTVNTUAADAAAAGAAYAEAAAAAYABgAWAAAAAgACABwAAAABgAGAHgAAAA).*/$1/
-</strippart>
<protocol>
GET /91 HTTP/1.1
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
@@ -108,7 +112,7 @@ Host: %HOSTIP:%HTTPPORT
Accept: */*
GET /91 HTTP/1.1
-Authorization: NTLM TlRMTVNTUAADAAAAGAAYAEAAAAAYABgAWAAAAAgACABwAAAABgAGAHgAAAA
+Authorization: NTLM TlRMTVNTUAADAAAAGAAYAEAAAAAYABgAWAAAAAgACABwAAAABgAGAHgAAAAIAAgAfgAAAAAAAAAAAAAABoKBAMIyJpR5mHpg2FZha5kRaFZ9436GAxPu0C5llxexSQ5QzVkiLSfkcpVyRgCXXqR+Am15ZG9tYWlubXlzZWxmY3VybGhvc3Q=
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
Host: %HOSTIP:%HTTPPORT
Accept: */*