Debian Codegraph @

curl/tests/data/test154

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