xref: /curl/tests/data/test1015 (revision 3fd80c7b)
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/%TESTNUMBER --data-urlencode "my name is moo[]" --data-urlencode "y e s=s_i_r" --data-urlencode "v_alue@%LOGDIR/%TESTNUMBER.txt" --data-urlencode @%LOGDIR/%TESTNUMBER.txt
32</command>
33<file name="%LOGDIR/%TESTNUMBER.txt">
34content to _?!#$'|<>
35</file>
36</client>
37
38#
39# Verify data after the test has been "shot"
40<verify>
41<protocol nonewline="yes">
42POST /%TESTNUMBER HTTP/1.1
43Host: %HOSTIP:%HTTPPORT
44User-Agent: curl/%VERSION
45Accept: */*
46Content-Length: 119
47Content-Type: application/x-www-form-urlencoded
48
49my+name+is+moo%5B%5D&y e s=s_i_r&v_alue=content+to+_%3F%21%23%24%27%7C%3C%3E%0A&content+to+_%3F%21%23%24%27%7C%3C%3E%0A
50</protocol>
51</verify>
52</testcase>
53