2007-01-23 05:25:56 +03:00
|
|
|
<testcase>
|
2012-11-19 20:54:52 +04:00
|
|
|
<info>
|
|
|
|
<keywords>
|
|
|
|
HTTP
|
|
|
|
HTTP POST
|
|
|
|
</keywords>
|
|
|
|
</info>
|
|
|
|
|
2004-04-23 12:40:11 +04:00
|
|
|
# Server-side
|
|
|
|
<reply>
|
|
|
|
<data>
|
|
|
|
HTTP/1.1 200 OK swsclose
|
2020-02-28 17:00:03 +03:00
|
|
|
Date: Tue, 09 Nov 2010 14:49:00 GMT
|
2004-04-23 12:40:11 +04:00
|
|
|
Server: test-server/fake
|
2006-11-25 16:32:04 +03:00
|
|
|
Content-Length: 10
|
2004-04-23 12:40:11 +04:00
|
|
|
|
|
|
|
blablabla
|
|
|
|
</data>
|
|
|
|
</reply>
|
|
|
|
|
|
|
|
# Client-side
|
|
|
|
<client>
|
|
|
|
<server>
|
|
|
|
http
|
|
|
|
</server>
|
|
|
|
<name>
|
|
|
|
HTTP multipart formpost with contents from a file
|
|
|
|
</name>
|
|
|
|
<command>
|
2004-09-08 12:08:38 +04:00
|
|
|
http://%HOSTIP:%HTTPPORT/we/want/163 -F "name=<log/field163" -F tool=curl
|
2004-04-23 12:40:11 +04:00
|
|
|
</command>
|
|
|
|
# We create this file before the command is invoked!
|
|
|
|
<file name="log/field163">
|
|
|
|
contents
|
|
|
|
from
|
|
|
|
a
|
|
|
|
file
|
|
|
|
|
|
|
|
newlinens?
|
|
|
|
yes please
|
|
|
|
|
|
|
|
[tab][CR] too
|
|
|
|
</file>
|
|
|
|
</client>
|
|
|
|
|
|
|
|
# Verify data after the test has been "shot"
|
|
|
|
<verify>
|
|
|
|
<strip>
|
2020-10-02 14:45:24 +03:00
|
|
|
^(Content-Type: multipart/form-data;|------------).*
|
2004-04-23 12:40:11 +04:00
|
|
|
</strip>
|
|
|
|
<protocol>
|
|
|
|
POST /we/want/163 HTTP/1.1
|
2007-09-14 23:32:31 +04:00
|
|
|
Host: %HOSTIP:%HTTPPORT
|
2020-10-02 14:45:24 +03:00
|
|
|
User-Agent: curl/%VERSION
|
2004-04-23 12:40:11 +04:00
|
|
|
Accept: */*
|
|
|
|
Content-Length: 304
|
|
|
|
Content-Type: multipart/form-data; boundary=----------------------------c2d1767eb6ac
|
|
|
|
|
|
|
|
------------------------------c2d1767eb6ac
|
|
|
|
Content-Disposition: form-data; name="name"
|
|
|
|
|
|
|
|
contents
|
|
|
|
from
|
|
|
|
a
|
|
|
|
file
|
|
|
|
|
|
|
|
newlinens?
|
|
|
|
yes please
|
|
|
|
|
|
|
|
[tab][CR] too
|
|
|
|
|
|
|
|
------------------------------c2d1767eb6ac
|
|
|
|
Content-Disposition: form-data; name="tool"
|
|
|
|
|
|
|
|
curl
|
|
|
|
------------------------------c2d1767eb6ac--
|
|
|
|
</protocol>
|
|
|
|
</verify>
|
2007-01-23 05:25:56 +03:00
|
|
|
</testcase>
|