1<testcase>
2<info>
3<keywords>
4HTTP
5HTTP POST
6--data-urlencode
7</keywords>
8</info>
9
10#
11# Server-side
12<reply>
13<data>
14HTTP/1.1 200 I am cool swsclose
15Server: Cool server/10.0
16Content-Length: 0
17
18</data>
19</reply>
20
21#
22# Client-side
23<client>
24<server>
25http
26</server>
27 <name>
28--data-urlencode
29 </name>
30 <command>
31http://%HOSTIP:%HTTPPORT/1015 --data-urlencode "my name is moo[]" --data-urlencode "y e s=s_i_r" --data-urlencode "v_alue@log/1015.txt" --data-urlencode @log/1015.txt 
32</command>
33<file name="log/1015.txt">
34content to _?!#$'|<>
35</file>
36</client>
37
38#
39# Verify data after the test has been "shot"
40<verify>
41<strip>
42^User-Agent:.*
43</strip>
44<protocol nonewline="yes">
45POST /1015 HTTP/1.1
46User-Agent: curl/7.17.2-CVS (i686-pc-linux-gnu) libcurl/7.17.2-CVS OpenSSL/0.9.8g zlib/1.2.3.3 c-ares/1.5.2-CVS libidn/1.1 libssh2/0.19.0-C
47Host: %HOSTIP:%HTTPPORT
48Accept: */*
49Content-Length: 133
50Content-Type: application/x-www-form-urlencoded
51
52my%20name%20is%20moo%5B%5D&y e s=s_i_r&v_alue=content%20to%20_%3F%21%23%24%27%7C%3C%3E%0A&content%20to%20_%3F%21%23%24%27%7C%3C%3E%0A
53</protocol>
54</verify>
55</testcase>
56