Make the server include "Connection: close" in the headers of the replies
[platform/upstream/curl.git] / tests / data / test154
1 # Server-side
2 <reply>
3 <servercmd>
4 auth_required
5 </servercmd>
6 <data>
7 HTTP/1.1 401 Authorization Required swsclose\r
8 Server: Apache/1.3.27 (Darwin) PHP/4.1.2\r
9 WWW-Authenticate: Blackmagic realm="gimme all yer s3cr3ts"\r
10 WWW-Authenticate: Basic realm="gimme all yer s3cr3ts"\r
11 WWW-Authenticate: Digest realm="gimme all yer s3cr3ts", nonce="11223344"\r
12 Content-Type: text/html; charset=iso-8859-1\r
13 Connection: close\r
14 \r
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\r
22 Server: Apache/1.3.27 (Darwin) PHP/4.1.2\r
23 Content-Type: text/html; charset=iso-8859-1\r
24 Content-Length: 23\r
25 Connection: close\r
26 \r
27 This IS the real page!
28 </data1000>
29
30 <datacheck>
31 HTTP/1.1 401 Authorization Required swsclose\r
32 Server: Apache/1.3.27 (Darwin) PHP/4.1.2\r
33 WWW-Authenticate: Blackmagic realm="gimme all yer s3cr3ts"\r
34 WWW-Authenticate: Basic realm="gimme all yer s3cr3ts"\r
35 WWW-Authenticate: Digest realm="gimme all yer s3cr3ts", nonce="11223344"\r
36 Content-Type: text/html; charset=iso-8859-1\r
37 Connection: close\r
38 \r
39 HTTP/1.1 200 OK swsclose\r
40 Server: Apache/1.3.27 (Darwin) PHP/4.1.2\r
41 Content-Type: text/html; charset=iso-8859-1\r
42 Content-Length: 23\r
43 Connection: close\r
44 \r
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:%HOSTPORT/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 HEAD /154 HTTP/1.1\r
76 Host: 127.0.0.1:8999\r
77 Pragma: no-cache\r
78 Accept: */*\r
79 \r
80 PUT /154 HTTP/1.1\r
81 Authorization: Digest username="testuser", realm="gimme all yer s3cr3ts", nonce="11223344", uri="/154", response="b71551e12d1c456e47d8388ecb2edeca"\r
82 User-Agent: curl/7.10.5 (i686-pc-linux-gnu) libcurl/7.10.5 OpenSSL/0.9.7a ipv6 zlib/1.1.3\r
83 Host: 127.0.0.1:8999\r
84 Pragma: no-cache\r
85 Accept: */*\r
86 Content-Length: 85\r
87 Expect: 100-continue\r
88 \r
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>