mirror of
https://github.com/moparisthebest/curl
synced 2024-11-11 12:05:06 -05:00
e2b4df7b5e
This makes the tests easier to copy and relocate to other test numbers without having to update content. Closes #6738
53 lines
995 B
Plaintext
53 lines
995 B
Plaintext
<testcase>
|
|
<info>
|
|
<keywords>
|
|
HTTP
|
|
HTTP POST
|
|
--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/%TESTNUMBER --data-urlencode "my name is moo[]" --data-urlencode "y e s=s_i_r" --data-urlencode "v_alue@log/%TESTNUMBER.txt" --data-urlencode @log/%TESTNUMBER.txt
|
|
</command>
|
|
<file name="log/%TESTNUMBER.txt">
|
|
content to _?!#$'|<>
|
|
</file>
|
|
</client>
|
|
|
|
#
|
|
# Verify data after the test has been "shot"
|
|
<verify>
|
|
<protocol nonewline="yes">
|
|
POST /%TESTNUMBER HTTP/1.1
|
|
Host: %HOSTIP:%HTTPPORT
|
|
User-Agent: curl/%VERSION
|
|
Accept: */*
|
|
Content-Length: 133
|
|
Content-Type: application/x-www-form-urlencoded
|
|
|
|
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
|
|
</protocol>
|
|
</verify>
|
|
</testcase>
|