Content-Length: now overrides other means of knowing when the stream has
[platform/upstream/curl.git] / tests / data / test3
1 #
2 # Server-side
3 <reply name="1">
4 <data>
5 HTTP/1.0 200 OK\r
6 Server: test-server/fake\r
7 Content-Type: text/html\r
8 Content-Length: 0\r
9 \r
10 this is data even though Content-Length is set to zero
11 </data>
12 <datacheck>
13 HTTP/1.0 200 OK\r
14 Server: test-server/fake\r
15 Content-Type: text/html\r
16 Content-Length: 0\r
17 \r
18 </datacheck>
19 </reply>
20
21 #
22 # Client-side
23 <client>
24 <server>
25 http
26 </server>
27  <name>
28 HTTP POST with auth and contents but with content-length set to 0
29  </name>
30  <command>
31  -d "fooo=mooo&pooo=clue&doo=%20%20%20++++" -u "fake:-user" http://%HOSTIP:%HOSTPORT/3
32 </command>
33 </test>
34
35 #
36 # Verify data after the test has been "shot"
37 <verify>
38 <strip>
39 ^User-Agent:.*
40 </strip>
41 <protocol nonewline=yes>
42 POST /3 HTTP/1.1\r
43 Authorization: Basic ZmFrZTotdXNlcg==\r
44 Host: 127.0.0.1:8999\r
45 Pragma: no-cache\r
46 Accept: image/gif, image/x-xbitmap, image/jpeg, image/pjpeg, */*\r
47 Content-Length: 37\r
48 Content-Type: application/x-www-form-urlencoded\r
49 \r
50 fooo=mooo&pooo=clue&doo=%20%20%20++++
51 </protocol>
52 </verify>