Debian Codegraph @

curl/tests/data/test88

raw
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
16 Server: Apache/1.3.27 (Darwin) PHP/4.1.2
17 WWW-Authenticate: Digest realm="testrealm", nonce="1053604145"
18 Content-Type: text/html; charset=iso-8859-1
19 Connection: close
20
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
28 Server: Apache/1.3.27 (Darwin) PHP/4.1.2
29 Content-Type: text/html; charset=iso-8859-1
30 Connection: close
31
32 This IS the real page!
33 </data1000>
34
35 <datacheck>
36 HTTP/1.1 401 Authorization Required swsclose
37 Server: Apache/1.3.27 (Darwin) PHP/4.1.2
38 WWW-Authenticate: Digest realm="testrealm", nonce="1053604145"
39 Content-Type: text/html; charset=iso-8859-1
40 Connection: close
41
42 HTTP/1.1 200 OK swsclose
43 Server: Apache/1.3.27 (Darwin) PHP/4.1.2
44 Content-Type: text/html; charset=iso-8859-1
45 Connection: close
46
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
78 Host: 127.0.0.1:%HTTPPORT
79 Accept: */*
80 Content-Length: 0
81 Expect: 100-continue
82
83 PUT /88 HTTP/1.1
84 Authorization: Digest username="testuser", realm="testrealm", nonce="1053604145", uri="/88", response="78a49fa53d0c228778297687d4168e71"
85 User-Agent: curl/7.10.5 (i686-pc-linux-gnu) libcurl/7.10.5 OpenSSL/0.9.7a ipv6 zlib/1.1.3
86 Host: 127.0.0.1:%HTTPPORT
87 Accept: */*
88 Content-Length: 85
89 Expect: 100-continue
90
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>