• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
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/88 -T log/put88 -u testuser:testpass --digest
67</command>
68<file name="log/put88">
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<strip>
79^User-Agent:.*
80</strip>
81<protocol>
82PUT /88 HTTP/1.1
83Host: %HOSTIP:%HTTPPORT
84Accept: */*
85Content-Length: 0
86
87PUT /88 HTTP/1.1
88Host: %HOSTIP:%HTTPPORT
89Authorization: Digest username="testuser", realm="testrealm", nonce="1053604145", uri="/88", response="78a49fa53d0c228778297687d4168e71"
90User-Agent: curl/7.10.5 (i686-pc-linux-gnu) libcurl/7.10.5 OpenSSL/0.9.7a ipv6 zlib/1.1.3
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