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