From 3e1caa61859a6057a65eb7c1585d47e05026c4f2 Mon Sep 17 00:00:00 2001 From: Daniel Stenberg Date: Wed, 24 Nov 2004 16:11:35 +0000 Subject: HTTP "auth done right". See lib/README.httpauth --- tests/data/test154 | 4 +++- tests/data/test155 | 8 ++++++-- tests/data/test156 | 5 ----- tests/data/test170 | 3 ++- tests/data/test174 | 30 +----------------------------- tests/data/test175 | 4 +++- tests/data/test176 | 4 +++- tests/data/test177 | 4 +++- tests/data/test88 | 4 +++- 9 files changed, 24 insertions(+), 42 deletions(-) (limited to 'tests/data') diff --git a/tests/data/test154 b/tests/data/test154 index 07be0c6b4..010137ece 100644 --- a/tests/data/test154 +++ b/tests/data/test154 @@ -72,10 +72,12 @@ four is the number of lines ^User-Agent:.* -HEAD /154 HTTP/1.1 +PUT /154 HTTP/1.1 Host: 127.0.0.1:%HTTPPORT Pragma: no-cache Accept: */* +Content-Length: 85 +Expect: 100-continue PUT /154 HTTP/1.1 Authorization: Digest username="testuser", realm="gimme all yer s3cr3ts", nonce="11223344", uri="/154", response="b71551e12d1c456e47d8388ecb2edeca" diff --git a/tests/data/test155 b/tests/data/test155 index 56322ebe2..55a965e49 100644 --- a/tests/data/test155 +++ b/tests/data/test155 @@ -90,16 +90,20 @@ four is the number of lines ^User-Agent:.* -HEAD /155 HTTP/1.1 +PUT /155 HTTP/1.1 Host: 127.0.0.1:%HTTPPORT Pragma: no-cache Accept: */* +Content-Length: 85 +Expect: 100-continue -HEAD /155 HTTP/1.1 +PUT /155 HTTP/1.1 Authorization: NTLM TlRMTVNTUAABAAAAAgIAAAAAAAAgAAAAAAAAACAAAAA= Host: 127.0.0.1:%HTTPPORT Pragma: no-cache Accept: */* +Content-Length: 0 +Expect: 100-continue PUT /155 HTTP/1.1 Authorization: NTLM TlRMTVNTUAADAAAAGAAYAEgAAAAYABgAYAAAAAAAAABAAAAACAAIAEAAAAAAAAAASAAAAAAAAAB4AAAAAYIAAHRlc3R1c2VyWmRDApEJkUyGOPS3DjvASModEeW/N/FBqYVyF4y6/y/7F6qmEQ7lXjXFF3tH1145 diff --git a/tests/data/test156 b/tests/data/test156 index f2f4aaabc..9a9aae9aa 100644 --- a/tests/data/test156 +++ b/tests/data/test156 @@ -58,11 +58,6 @@ four is the number of lines ^User-Agent:.* -HEAD /156 HTTP/1.1 -Host: 127.0.0.1:%HTTPPORT -Pragma: no-cache -Accept: */* - PUT /156 HTTP/1.1 User-Agent: curl/7.10.5 (i686-pc-linux-gnu) libcurl/7.10.5 OpenSSL/0.9.7a ipv6 zlib/1.1.3 Host: 127.0.0.1:%HTTPPORT diff --git a/tests/data/test170 b/tests/data/test170 index 659f693db..46012ad4e 100644 --- a/tests/data/test170 +++ b/tests/data/test170 @@ -24,12 +24,13 @@ http://a.galaxy.far.far.away/170 --proxy http://%HOSTIP:%HTTPPORT --proxy-user f ^User-Agent: curl/.* -HEAD http://a.galaxy.far.far.away/170 HTTP/1.1 +POST http://a.galaxy.far.far.away/170 HTTP/1.1 Proxy-Authorization: NTLM TlRMTVNTUAABAAAAAgIAAAAAAAAgAAAAAAAAACAAAAA= 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 libidn/0.4.3 Host: a.galaxy.far.far.away Pragma: no-cache Accept: */* +Content-Length: 0 # 52 is CURLE_GOT_NOTHING diff --git a/tests/data/test174 b/tests/data/test174 index 363a4899e..6f19a7613 100644 --- a/tests/data/test174 +++ b/tests/data/test174 @@ -1,35 +1,13 @@ # Server-side -HTTP/1.1 200 beng swsclose swsbounce +HTTP/1.1 200 beng swsclose Server: Microsoft-IIS/6.0 Authentication-Info: Passport1.4 tname=MSPAuth,tname=MSPProf,tname=MSPConsent,tname=MSPSecAuth Content-Type: text/html; charset=iso-8859-1 This is not the real page - - -HTTP/1.1 200 moo swsclose -Server: Microsoft-IIS/6.0 -Content-Type: text/html; charset=iso-8859-1 - -content for you - - - -HTTP/1.1 200 beng swsclose swsbounce -Server: Microsoft-IIS/6.0 -Authentication-Info: Passport1.4 tname=MSPAuth,tname=MSPProf,tname=MSPConsent,tname=MSPSecAuth -Content-Type: text/html; charset=iso-8859-1 - -HTTP/1.1 200 moo swsclose -Server: Microsoft-IIS/6.0 -Content-Type: text/html; charset=iso-8859-1 - -content for you - - # Client-side @@ -52,12 +30,6 @@ http://%HOSTIP:%HTTPPORT/174 -u testuser:testpass --anyauth -d "junkelijunk" ^User-Agent:.* -HEAD /174 HTTP/1.1 -User-Agent: curl/7.12.1-CVS (i686-pc-linux-gnu) libcurl/7.12.1-CVS OpenSSL/0.9.6b ipv6 zlib/1.1.4 GSS libidn/0.4.6 -Host: 127.0.0.1:%HTTPPORT -Pragma: no-cache -Accept: */* - POST /174 HTTP/1.1 User-Agent: curl/7.12.1-CVS (i686-pc-linux-gnu) libcurl/7.12.1-CVS OpenSSL/0.9.6b ipv6 zlib/1.1.4 GSS libidn/0.4.6 Host: 127.0.0.1:%HTTPPORT diff --git a/tests/data/test175 b/tests/data/test175 index 57496cd83..1cf9ac481 100644 --- a/tests/data/test175 +++ b/tests/data/test175 @@ -52,11 +52,13 @@ http://%HOSTIP:%HTTPPORT/175 -u auser:apasswd --digest -d "junkelijunk" ^User-Agent:.* -HEAD /175 HTTP/1.1 +POST /175 HTTP/1.1 User-Agent: curl/7.12.1-CVS (i686-pc-linux-gnu) libcurl/7.12.1-CVS OpenSSL/0.9.6b ipv6 zlib/1.1.4 GSS libidn/0.4.6 Host: 127.0.0.1:%HTTPPORT Pragma: no-cache Accept: */* +Content-Length: 0 +Content-Type: application/x-www-form-urlencoded POST /175 HTTP/1.1 User-Agent: curl/7.12.1-CVS (i686-pc-linux-gnu) libcurl/7.12.1-CVS OpenSSL/0.9.6b ipv6 zlib/1.1.4 GSS libidn/0.4.6 diff --git a/tests/data/test176 b/tests/data/test176 index 387a68959..5d9cbff44 100644 --- a/tests/data/test176 +++ b/tests/data/test176 @@ -56,12 +56,14 @@ http://%HOSTIP:%HTTPPORT/176 -u auser:apasswd --ntlm -d "junkelijunk" ^User-Agent:.* -HEAD /176 HTTP/1.1 +POST /176 HTTP/1.1 Authorization: NTLM TlRMTVNTUAABAAAAAgIAAAAAAAAgAAAAAAAAACAAAAA= User-Agent: curl/7.12.1-CVS (i686-pc-linux-gnu) libcurl/7.12.1-CVS OpenSSL/0.9.6b ipv6 zlib/1.1.4 GSS libidn/0.4.6 Host: 127.0.0.1:%HTTPPORT Pragma: no-cache Accept: */* +Content-Length: 0 +Content-Type: application/x-www-form-urlencoded POST /176 HTTP/1.1 User-Agent: curl/7.12.1-CVS (i686-pc-linux-gnu) libcurl/7.12.1-CVS OpenSSL/0.9.6b ipv6 zlib/1.1.4 GSS libidn/0.4.6 diff --git a/tests/data/test177 b/tests/data/test177 index 8543ab694..9188de045 100644 --- a/tests/data/test177 +++ b/tests/data/test177 @@ -29,11 +29,13 @@ http://%HOSTIP:%HTTPPORT/177 -u auser:apasswd --digest -d "junkelijunk" ^User-Agent:.* -HEAD /177 HTTP/1.1 +POST /177 HTTP/1.1 User-Agent: curl/7.12.1-CVS (i686-pc-linux-gnu) libcurl/7.12.1-CVS OpenSSL/0.9.6b ipv6 zlib/1.1.4 GSS libidn/0.4.6 Host: 127.0.0.1:%HTTPPORT Pragma: no-cache Accept: */* +Content-Length: 0 +Content-Type: application/x-www-form-urlencoded diff --git a/tests/data/test88 b/tests/data/test88 index a07b3a3e1..e6e2e4779 100644 --- a/tests/data/test88 +++ b/tests/data/test88 @@ -66,10 +66,12 @@ four is the number of lines ^User-Agent:.* -HEAD /88 HTTP/1.1 +PUT /88 HTTP/1.1 Host: 127.0.0.1:%HTTPPORT Pragma: no-cache Accept: */* +Content-Length: 0 +Expect: 100-continue PUT /88 HTTP/1.1 Authorization: Digest username="testuser", realm="testrealm", nonce="1053604145", uri="/88", response="78a49fa53d0c228778297687d4168e71" -- cgit v1.2.3