2007-11-26 19:04:21 +08:00
<testcase>
<info>
<keywords>
2012-11-20 00:54:52 +08:00
HTTP
HTTP POST
2007-11-26 19:04:21 +08:00
--data-urlencode
</keywords>
</info>
#
# Server-side
<reply>
<data>
HTTP/1.1 200 I am cool swsclose
Server: Cool server/10.0
Content-Length: 0
</data>
</reply>
#
# Client-side
<client>
<server>
http
</server>
<name>
--data-urlencode
</name>
<command>
http://%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
</command>
<file name="log/1015.txt">
content to _?!#$'|<>
</file>
</client>
#
# Verify data after the test has been "shot"
<verify>
<protocol nonewline="yes">
POST /1015 HTTP/1.1
Host: %HOSTIP:%HTTPPORT
2020-10-02 19:45:24 +08:00
User-Agent: curl/%VERSION
2007-11-26 19:04:21 +08:00
Accept: */*
2010-09-29 05:46:14 +08:00
Content-Length: 133
2007-11-26 19:04:21 +08:00
Content-Type: application/x-www-form-urlencoded
2010-09-29 05:46:14 +08:00
my%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
2007-11-26 19:04:21 +08:00
</protocol>
</verify>
</testcase>