From 1e29d275c643ef6aab7948f0f55a7a9397e56b42 Mon Sep 17 00:00:00 2001 From: Daniel Stenberg Date: Fri, 15 Mar 2013 17:28:32 +0100 Subject: test1509: verify proxy header response headers count Modified sws to support and use custom CONNECT responses instead of the previously naive hard-coded version. Made the HTTP test server able to extract test case number from the host name in a CONNECT request by finding the number after the last dot. It makes 'machine.moo.123' use test case 123. Adapted a larger amount of tests to the new style. Bug: http://curl.haxx.se/bug/view.cgi?id=1204 Reported by: Martin Jansen --- tests/data/test1008 | 20 ++++++++++---------- 1 file changed, 10 insertions(+), 10 deletions(-) (limited to 'tests/data/test1008') diff --git a/tests/data/test1008 b/tests/data/test1008 index e576e7197..30714f9af 100644 --- a/tests/data/test1008 +++ b/tests/data/test1008 @@ -16,7 +16,7 @@ connection-monitor # this is returned first since we get no proxy-auth - + HTTP/1.1 407 Authorization Required to proxy me my dear Proxy-Authenticate: NTLM TlRMTVNTUAACAAAAAgACADAAAAAGgoEAc51AYVDgyNcAAAAAAAAAAG4AbgAyAAAAQ0MCAAQAQwBDAAEAEgBFAEwASQBTAEEAQgBFAFQASAAEABgAYwBjAC4AaQBjAGUAZABlAHYALgBuAHUAAwAsAGUAbABpAHMAYQBiAGUAdABoAC4AYwBjAC4AaQBjAGUAZABlAHYALgBuAHUAAAAAAA== Transfer-Encoding: chunked @@ -27,16 +27,16 @@ FA0 XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX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XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX 0 - + # This is supposed to be returned when the server gets the second # Authorization: NTLM line passed-in from the client - + HTTP/1.1 200 Things are fine in proxy land Server: Microsoft-IIS/5.0 Content-Type: text/html; charset=iso-8859-1 - + # this is returned when we get a GET! @@ -96,7 +96,7 @@ CURL_GETHOSTNAME=curlhost LD_PRELOAD=%PWD/libtest/.libs/libhostname.so -http://test.remote.example.com:1008/path/10080002 --proxy http://%HOSTIP:%HTTPPORT --proxy-user silly:person --proxy-ntlm --proxytunnel +http://test.remote.example.com.1008:%HTTPPORT/path/10080002 --proxy http://%HOSTIP:%HTTPPORT --proxy-user silly:person --proxy-ntlm --proxytunnel chkhostname curlhost @@ -109,19 +109,19 @@ chkhostname curlhost ^User-Agent: curl/.* -CONNECT test.remote.example.com:1008 HTTP/1.1 -Host: test.remote.example.com:1008 +CONNECT test.remote.example.com.1008:%HTTPPORT HTTP/1.1 +Host: test.remote.example.com.1008:%HTTPPORT Proxy-Authorization: NTLM TlRMTVNTUAABAAAABoIIAAAAAAAAAAAAAAAAAAAAAAA= Proxy-Connection: Keep-Alive -CONNECT test.remote.example.com:1008 HTTP/1.1 -Host: test.remote.example.com:1008 +CONNECT test.remote.example.com.1008:%HTTPPORT HTTP/1.1 +Host: test.remote.example.com.1008:%HTTPPORT Proxy-Authorization: NTLM TlRMTVNTUAADAAAAGAAYAEAAAAAYABgAWAAAAAAAAABwAAAABQAFAHAAAAAIAAgAdQAAAAAAAAAAAAAABoKBAKAeQjzKtCQ7ubW8S6MN7B59436GAxPu0CVROwwNBsgxML49gcbAXLT/bU+H5wrS9XNpbGx5Y3VybGhvc3Q= Proxy-Connection: Keep-Alive GET /path/10080002 HTTP/1.1 User-Agent: curl/7.12.3-CVS (i686-pc-linux-gnu) libcurl/7.12.3-CVS OpenSSL/0.9.6b zlib/1.1.4 -Host: test.remote.example.com:1008 +Host: test.remote.example.com.1008:%HTTPPORT Accept: */* [DISCONNECT] -- cgit v1.2.3