Debian Codegraph @

curl/tests/data/test3

raw
1 <info>
2 <keywords>
3 HTTP
4 HTTP POST
5 HTTP Basic auth
6 </keywords>
7 </info>
8 #
9 # Server-side
10 <reply>
11 <data>
12 HTTP/1.0 200 OK
13 Server: test-server/fake
14 Content-Type: text/html
15 Content-Length: 0
16
17 this is data even though Content-Length is set to zero
18 </data>
19 <datacheck>
20 HTTP/1.0 200 OK
21 Server: test-server/fake
22 Content-Type: text/html
23 Content-Length: 0
24
25 </datacheck>
26 </reply>
27
28 #
29 # Client-side
30 <client>
31 <server>
32 http
33 </server>
34 <name>
35 HTTP POST with auth and contents but with content-length set to 0
36 </name>
37 <command>
38 -d "fooo=mooo&pooo=clue&doo=%20%20%20++++" -u "fake:-user" http://%HOSTIP:%HTTPPORT/3
39 </command>
40 </client>
41
42 #
43 # Verify data after the test has been "shot"
44 <verify>
45 <strip>
46 ^User-Agent:.*
47 </strip>
48 <protocol nonewline=yes>
49 POST /3 HTTP/1.1
50 Authorization: Basic ZmFrZTotdXNlcg==
51 Host: 127.0.0.1:%HTTPPORT
52 Accept: */*
53 Content-Length: 37
54 Content-Type: application/x-www-form-urlencoded
55
56 fooo=mooo&pooo=clue&doo=%20%20%20++++
57 </protocol>
58 </verify>