04c18f91a577fb457487374edd61e1b5dfe9d67d
[platform/upstream/curl.git] / tests / data / test1002
1 <testcase>
2 <info>
3 <keywords>
4 HTTP
5 HTTP PUT
6 HTTP proxy
7 HTTP Digest auth
8 Resume
9 Content-Range
10 CUSTOMREQUEST
11 </keywords>
12 </info>
13
14 <reply>
15 <data>
16 HTTP/1.1 100 Continue\r
17 Server: Microsoft-IIS/5.0\r
18 Date: Sun, 03 Apr 2005 14:57:45 GMT\r
19 X-Powered-By: ASP.NET\r
20 \r
21 HTTP/1.1 401 authentication please swsbounce\r
22 Server: Microsoft-IIS/6.0\r
23 WWW-Authenticate: Digest realm="testrealm", nonce="1053604144"\r
24 Content-Type: text/html; charset=iso-8859-1\r
25 Content-Length: 0\r
26 \r
27 </data>
28 <data1000>
29 HTTP/1.1 200 A OK\r
30 Server: Microsoft-IIS/6.0\r
31 Content-Type: text/html; charset=iso-8859-1\r
32 Content-Length: 3\r
33 \r
34 ok
35 </data1000>
36
37 <datacheck>
38 HTTP/1.1 100 Continue\r
39 Server: Microsoft-IIS/5.0\r
40 Date: Sun, 03 Apr 2005 14:57:45 GMT\r
41 X-Powered-By: ASP.NET\r
42 \r
43 HTTP/1.1 401 authentication please swsbounce\r
44 Server: Microsoft-IIS/6.0\r
45 WWW-Authenticate: Digest realm="testrealm", nonce="1053604144"\r
46 Content-Type: text/html; charset=iso-8859-1\r
47 Content-Length: 0\r
48 \r
49 HTTP/1.1 200 A OK\r
50 Server: Microsoft-IIS/6.0\r
51 Content-Type: text/html; charset=iso-8859-1\r
52 Content-Length: 3\r
53 \r
54 ok
55 </datacheck>
56
57 </reply>
58
59 # Client-side
60 <client>
61
62 <server>
63 http
64 </server>
65  <name>
66 HTTP POST --digest with PUT and resumed upload and modified method, twice
67  </name>
68  <command>
69 http://%HOSTIP:%HTTPPORT/1002.upload1 -T log/1002 http://%HOSTIP:%HTTPPORT/1002.upload2 -T log/1002 -u auser:apasswd --digest -x  http://%HOSTIP:%HTTPPORT -C 2 -X GET
70 </command>
71 <file name="log/1002">
72 test
73 </file>
74 </client>
75
76 # Verify data after the test has been "shot"
77 <verify>
78 <strip>
79 ^User-Agent:.*
80 </strip>
81 <protocol>
82 GET http://%HOSTIP:%HTTPPORT/1002.upload1 HTTP/1.1\r
83 Content-Range: bytes 2-4/5\r
84 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\r
85 Host: %HOSTIP:%HTTPPORT\r
86 Accept: */*\r
87 Proxy-Connection: Keep-Alive\r
88 Content-Length: 0\r
89 Expect: 100-continue\r
90 \r
91 GET http://%HOSTIP:%HTTPPORT/1002.upload1 HTTP/1.1\r
92 Authorization: Digest username="auser", realm="testrealm", nonce="1053604144", uri="/1002.upload1", response="198aa9b6acb4b0c71d02a197a5e41f54"\r
93 Content-Range: bytes 2-4/5\r
94 Host: %HOSTIP:%HTTPPORT\r
95 Accept: */*\r
96 Proxy-Connection: Keep-Alive\r
97 Content-Length: 3\r
98 Expect: 100-continue\r
99 \r
100 st
101 GET http://%HOSTIP:%HTTPPORT/1002.upload2 HTTP/1.1\r
102 Authorization: Digest username="auser", realm="testrealm", nonce="1053604144", uri="/1002.upload2", response="d711f0d2042786d930de635ba0d1a1d0"\r
103 Content-Range: bytes 2-4/5\r
104 User-Agent: curl/7.16.1\r
105 Host: %HOSTIP:%HTTPPORT\r
106 Accept: */*\r
107 Proxy-Connection: Keep-Alive\r
108 Content-Length: 3\r
109 Expect: 100-continue\r
110 \r
111 st
112 </protocol>
113 </verify>
114 </testcase>