Revert "Update to 7.40.1"
[platform/upstream/curl.git] / tests / data / test565
index 2014220..e93ee3e 100644 (file)
@@ -2,49 +2,52 @@
 <info>
 <keywords>
 HTTP
-HTTP GET
-cookies
+HTTP POST
+HTTP Digest auth
 </keywords>
 </info>
+#
 # Server-side
 <reply>
 <data>
-HTTP/1.1 301 Moved
-Date: Thu, 09 Nov 2010 14:49:00 GMT
-Location: /want/data/5650002
-Server: test-server/fake
-Set-Cookie: test=true; domain=127.0.0.1; path=/; expires=Thu Jan  1 00:00:00 GMT 1970;
-Set-Cookie: test2=true; domain=127.0.0.1; path=/; expires=Fri Feb 2 11:56:27 GMT 2035;
-Connection: close
-
-This server reply is for testing a set-cookie
-
+HTTP/1.1 100 Continue\r
+Server: Microsoft-IIS/5.0\r
+Date: Sun, 03 Apr 2005 14:57:45 GMT\r
+X-Powered-By: ASP.NET\r
+\r
+HTTP/1.1 401 authentication please swsbounce\r
+Server: Microsoft-IIS/6.0\r
+WWW-Authenticate: Digest realm="testrealm", nonce="1053604144"\r
+Content-Type: text/html; charset=iso-8859-1\r
+Content-Length: 0\r
+\r
 </data>
-<data2>
-HTTP/1.1 200 Followed here fine swsclose
-Date: Thu, 09 Nov 2010 14:49:00 GMT
-Server: test-server/fake
-Content-Length: 52
-
-If this is received, the location following worked
-
-</data2>
+<data1>
+HTTP/1.1 200 A OK\r
+Server: Microsoft-IIS/6.0\r
+Content-Type: text/html; charset=iso-8859-1\r
+Content-Length: 3\r
+\r
+ok
+</data1>
 <datacheck>
-HTTP/1.1 301 Moved
-Date: Thu, 09 Nov 2010 14:49:00 GMT
-Location: /want/data/5650002
-Server: test-server/fake
-Set-Cookie: test=true; domain=127.0.0.1; path=/; expires=Thu Jan  1 00:00:00 GMT 1970;
-Set-Cookie: test2=true; domain=127.0.0.1; path=/; expires=Fri Feb 2 11:56:27 GMT 2035;
-Connection: close
-
-HTTP/1.1 200 Followed here fine swsclose
-Date: Thu, 09 Nov 2010 14:49:00 GMT
-Server: test-server/fake
-Content-Length: 52
-
-If this is received, the location following worked
-
+HTTP/1.1 100 Continue\r
+Server: Microsoft-IIS/5.0\r
+Date: Sun, 03 Apr 2005 14:57:45 GMT\r
+X-Powered-By: ASP.NET\r
+\r
+HTTP/1.1 401 authentication please swsbounce\r
+Server: Microsoft-IIS/6.0\r
+WWW-Authenticate: Digest realm="testrealm", nonce="1053604144"\r
+Content-Type: text/html; charset=iso-8859-1\r
+Content-Length: 0\r
+\r
+HTTP/1.1 200 A OK\r
+Server: Microsoft-IIS/6.0\r
+Content-Type: text/html; charset=iso-8859-1\r
+Content-Length: 3\r
+\r
+ok
 </datacheck>
 </reply>
 
@@ -53,30 +56,51 @@ If this is received, the location following worked
 <server>
 http
 </server>
+<features>
+crypto
+</features>
+# tool is what to use instead of 'curl'
+<tool>
+lib565
+</tool>
+
  <name>
-HTTP cookie expiry date at Jan 1 00:00:00 GMT 1970
+send HTTP POST using read callback, chunked transfer-encoding and Digest
  </name>
  <command>
-http://%HOSTIP:%HTTPPORT/want/565 -L -x %HOSTIP:%HTTPPORT -c log/cookies.jar
+http://%HOSTIP:%HTTPPORT/565
 </command>
 </client>
 
+#
 # Verify data after the test has been "shot"
 <verify>
-<strip>
-^User-Agent:.*
-</strip>
 <protocol>
-GET http://%HOSTIP:%HTTPPORT/want/565 HTTP/1.1\r
+POST /565 HTTP/1.1\r
 Host: %HOSTIP:%HTTPPORT\r
 Accept: */*\r
-Proxy-Connection: Keep-Alive\r
+Transfer-Encoding: chunked\r
+Content-Type: application/x-www-form-urlencoded\r
 \r
-GET http://%HOSTIP:%HTTPPORT/want/data/5650002 HTTP/1.1\r
+0\r
+\r
+POST /565 HTTP/1.1\r
+Authorization: Digest username="foo", realm="testrealm", nonce="1053604144", uri="/565", response="877424f750af047634dbd94f9933217b"\r
 Host: %HOSTIP:%HTTPPORT\r
 Accept: */*\r
-Proxy-Connection: Keep-Alive\r
-Cookie: test2=true\r
+Transfer-Encoding: chunked\r
+Content-Type: application/x-www-form-urlencoded\r
+Expect: 100-continue\r
+\r
+3\r
+one\r
+3\r
+two\r
+5\r
+three\r
+1d\r
+and a final longer crap: four\r
+0\r
 \r
 </protocol>
 </verify>