| xf.li | 6c8fc1e | 2023-08-12 00:11:09 -0700 | [diff] [blame] | 1 | <testcase> | 
|  | 2 | <info> | 
|  | 3 | <keywords> | 
|  | 4 | HTTP | 
|  | 5 | HTTP POST | 
|  | 6 | --data-urlencode | 
|  | 7 | </keywords> | 
|  | 8 | </info> | 
|  | 9 |  | 
|  | 10 | # | 
|  | 11 | # Server-side | 
|  | 12 | <reply> | 
|  | 13 | <data> | 
|  | 14 | HTTP/1.1 200 I am cool swsclose | 
|  | 15 | Server: Cool server/10.0 | 
|  | 16 | Content-Length: 0 | 
|  | 17 |  | 
|  | 18 | </data> | 
|  | 19 | </reply> | 
|  | 20 |  | 
|  | 21 | # | 
|  | 22 | # Client-side | 
|  | 23 | <client> | 
|  | 24 | <server> | 
|  | 25 | http | 
|  | 26 | </server> | 
|  | 27 | <name> | 
|  | 28 | --data-urlencode | 
|  | 29 | </name> | 
|  | 30 | <command> | 
|  | 31 | 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 | 
|  | 32 | </command> | 
|  | 33 | <file name="log/%TESTNUMBER.txt"> | 
|  | 34 | content to _?!#$'|<> | 
|  | 35 | </file> | 
|  | 36 | </client> | 
|  | 37 |  | 
|  | 38 | # | 
|  | 39 | # Verify data after the test has been "shot" | 
|  | 40 | <verify> | 
|  | 41 | <protocol nonewline="yes"> | 
|  | 42 | POST /%TESTNUMBER HTTP/1.1 | 
|  | 43 | Host: %HOSTIP:%HTTPPORT | 
|  | 44 | User-Agent: curl/%VERSION | 
|  | 45 | Accept: */* | 
|  | 46 | Content-Length: 119 | 
|  | 47 | Content-Type: application/x-www-form-urlencoded | 
|  | 48 |  | 
|  | 49 | my+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> |