xref: /curl/tests/data/test88 (revision 3fd80c7b)
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>
59!SSPI
60crypto
61</features>
62<name>
63HTTP PUT with Digest authorization
64</name>
65<command>
66http://%HOSTIP:%HTTPPORT/%TESTNUMBER -T %LOGDIR/put%TESTNUMBER -u testuser:testpass --digest
67</command>
68<file name="%LOGDIR/put%TESTNUMBER">
69This is data we upload with PUT
70a second line
71line three
72four is the number of lines
73</file>
74</client>
75
76# Verify data after the test has been "shot"
77<verify>
78<protocol>
79PUT /%TESTNUMBER HTTP/1.1
80Host: %HOSTIP:%HTTPPORT
81User-Agent: curl/%VERSION
82Accept: */*
83Content-Length: 0
84
85PUT /%TESTNUMBER HTTP/1.1
86Host: %HOSTIP:%HTTPPORT
87Authorization: Digest username="testuser", realm="testrealm", nonce="1053604145", uri="/%TESTNUMBER", response="78a49fa53d0c228778297687d4168e71"
88User-Agent: curl/%VERSION
89Accept: */*
90Content-Length: 85
91
92This is data we upload with PUT
93a second line
94line three
95four is the number of lines
96</protocol>
97</verify>
98</testcase>
99