| 1 |
# Server-side |
| 2 |
<reply> |
| 3 |
<data> |
| 4 |
HTTP/1.1 200 OK swsclose |
| 5 |
Date: Thu, 09 Nov 2010 14:49:00 GMT |
| 6 |
Server: test-server/fake |
| 7 |
|
| 8 |
blablabla |
| 9 |
</data> |
| 10 |
</reply> |
| 11 |
|
| 12 |
# Client-side |
| 13 |
<client> |
| 14 |
<server> |
| 15 |
http |
| 16 |
</server> |
| 17 |
<name> |
| 18 |
HTTP formpost a file with spaces in name |
| 19 |
</name> |
| 20 |
<command> |
| 21 |
http://%HOSTIP:%HTTPPORT/we/want/166 -F "name=@log/fie ld 166" |
| 22 |
</command> |
| 23 |
# We create this file before the command is invoked! |
| 24 |
<file name="log/fie ld 166"> |
| 25 |
data inside the file |
| 26 |
</file> |
| 27 |
</client> |
| 28 |
|
| 29 |
# Verify data after the test has been "shot" |
| 30 |
<verify> |
| 31 |
<strip> |
| 32 |
^(User-Agent:|Content-Type: multipart/form-data;|------------).* |
| 33 |
</strip> |
| 34 |
<protocol> |
| 35 |
POST /we/want/166 HTTP/1.1 |
| 36 |
User-Agent: curl/7.12.0-CVS (i686-pc-linux-gnu) libcurl/7.12.0-CVS OpenSSL/0.9.6b zlib/1.1.4 c-ares/1.2.0 libidn/0.4.3 |
| 37 |
Host: 127.0.0.1:%HTTPPORT |
| 38 |
Accept: */* |
| 39 |
Content-Length: 223 |
| 40 |
Expect: 100-continue |
| 41 |
Content-Type: multipart/form-data; boundary=----------------------------b0b3d6d23991 |
| 42 |
|
| 43 |
------------------------------b0b3d6d23991 |
| 44 |
Content-Disposition: form-data; name="name"; filename="fie ld 166" |
| 45 |
Content-Type: application/octet-stream |
| 46 |
|
| 47 |
data inside the file |
| 48 |
|
| 49 |
------------------------------b0b3d6d23991-- |
| 50 |
</protocol> |
| 51 |
</verify> |