Modified the default HTTP headers used by libcurl:
[platform/upstream/curl.git] / tests / data / test88
1 <info>
2 <keywords>
3 HTTP
4 HTTP PUT
5 HTTP Digest auth
6 </keywords>
7 </info>
8
9 # Server-side
10 <reply>
11 <servercmd>
12 auth_required
13 </servercmd>
14 <data>
15 HTTP/1.1 401 Authorization Required swsclose\r
16 Server: Apache/1.3.27 (Darwin) PHP/4.1.2\r
17 WWW-Authenticate: Digest realm="testrealm", nonce="1053604145"\r
18 Content-Type: text/html; charset=iso-8859-1\r
19 Connection: close\r
20 \r
21 This is not the real page
22 </data>
23
24 # This is supposed to be returned when the server gets a
25 # Authorization: Digest line passed-in from the client
26 <data1000>
27 HTTP/1.1 200 OK swsclose\r
28 Server: Apache/1.3.27 (Darwin) PHP/4.1.2\r
29 Content-Type: text/html; charset=iso-8859-1\r
30 Connection: close\r
31 \r
32 This IS the real page!
33 </data1000>
34
35 <datacheck>
36 HTTP/1.1 401 Authorization Required swsclose\r
37 Server: Apache/1.3.27 (Darwin) PHP/4.1.2\r
38 WWW-Authenticate: Digest realm="testrealm", nonce="1053604145"\r
39 Content-Type: text/html; charset=iso-8859-1\r
40 Connection: close\r
41 \r
42 HTTP/1.1 200 OK swsclose\r
43 Server: Apache/1.3.27 (Darwin) PHP/4.1.2\r
44 Content-Type: text/html; charset=iso-8859-1\r
45 Connection: close\r
46 \r
47 This IS the real page!
48 </datacheck>
49
50 </reply>
51
52 # Client-side
53 <client>
54 <server>
55 http
56 </server>
57  <name>
58 HTTP PUT with Digest authorization
59  </name>
60  <command>
61 http://%HOSTIP:%HTTPPORT/88 -T log/put88 -u testuser:testpass --digest
62 </command>
63 <file name="log/put88">
64 This is data we upload with PUT
65 a second line
66 line three
67 four is the number of lines
68 </file>
69 </client>
70
71 # Verify data after the test has been "shot"
72 <verify>
73 <strip>
74 ^User-Agent:.*
75 </strip>
76 <protocol>
77 PUT /88 HTTP/1.1\r
78 Host: 127.0.0.1:%HTTPPORT\r
79 Accept: */*\r
80 Content-Length: 0\r
81 Expect: 100-continue\r
82 \r
83 PUT /88 HTTP/1.1\r
84 Authorization: Digest username="testuser", realm="testrealm", nonce="1053604145", uri="/88", response="78a49fa53d0c228778297687d4168e71"\r
85 User-Agent: curl/7.10.5 (i686-pc-linux-gnu) libcurl/7.10.5 OpenSSL/0.9.7a ipv6 zlib/1.1.3\r
86 Host: 127.0.0.1:%HTTPPORT\r
87 Accept: */*\r
88 Content-Length: 85\r
89 Expect: 100-continue\r
90 \r
91 This is data we upload with PUT
92 a second line
93 line three
94 four is the number of lines
95 </protocol>
96 </verify>