1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57
|
<?xml version="1.0" encoding="US-ASCII"?>
<testcase>
<info>
<keywords>
HTTP
HTTP POST
--data-urlencode
--url-query
</keywords>
</info>
# Server-side
<reply>
<data crlf="headers">
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>
--url-query with --data-urlencode
</name>
<command>
http://%HOSTIP:%HTTPPORT/%TESTNUMBER
--url-query "my name is moo[]"
--url-query "yes=s i r"
--url-query "v_alue@%LOGDIR/%TESTNUMBER.txt"
--url-query @%LOGDIR/%TESTNUMBER.txt
--url-query "+%3d%3d"
--data-urlencode "start=once upon the time"
</command>
<file name="%LOGDIR/%TESTNUMBER.txt">
content to _?!#$'|%LT%GT
</file>
</client>
# Verify data after the test has been "shot"
<verify>
<protocol crlf="yes" nonewline="yes">
POST /%TESTNUMBER?my+name+is+moo%5b%5d%AMPyes=s+i+r%AMPv_alue=content+to+_%3f%21%23%24%27%7c%3c%3e%0a%AMPcontent+to+_%3f%21%23%24%27%7c%3c%3e%0a%AMP%3d%3d HTTP/1.1
Host: %HOSTIP:%HTTPPORT
User-Agent: curl/%VERSION
Accept: */*
Content-Length: 24
Content-Type: application/x-www-form-urlencoded
start=once+upon+the+time
</protocol>
</verify>
</testcase>
|