1<testcase>
2<info>
3<keywords>
4HTTP
5HTTP FORMPOST
6config file
7</keywords>
8</info>
9# Server-side
10<reply>
11<data>
12HTTP/1.1 200 OK swsclose
13Date: Thu, 09 Nov 2010 14:49:00 GMT
14Server: test-server/fake
15Content-Length: 11
16
17blablabla
18
19</data>
20</reply>
21
22# Client-side
23<client>
24<server>
25http
26</server>
27 <name>
28HTTP and -F upload in config file
29 </name>
30<stdin>
31-F name=daniel
32-F tool=curl
33-F file=@log/test71.txt
34</stdin>
35 <command>
36http://%HOSTIP:%HTTPPORT/we/want/71 -K -
37</command>
38# We create this file before the command is invoked!
39<file name="log/test71.txt">
40foo-
41This is a moo-
42bar
43</file>
44</client>
45
46# Verify data after the test has been "shot"
47<verify>
48<strip>
49^(User-Agent:|Content-Type: multipart/form-data;|------------).*
50</strip>
51<protocol>
52POST /we/want/71 HTTP/1.1
53User-Agent: curl/7.10.4 (i686-pc-linux-gnu) libcurl/7.10.4 OpenSSL/0.9.7a ipv6 zlib/1.1.3
54Host: %HOSTIP:%HTTPPORT
55Accept: */*
56Content-Length: 408
57Expect: 100-continue
58Content-Type: multipart/form-data; boundary=----------------------------9ef8d6205763
59
60------------------------------9ef8d6205763
61Content-Disposition: form-data; name="name"
62
63daniel
64------------------------------9ef8d6205763
65Content-Disposition: form-data; name="tool"
66
67curl
68------------------------------9ef8d6205763
69Content-Disposition: form-data; name="file"; filename="test71.txt"
70Content-Type: text/plain
71
72foo-
73This is a moo-
74bar
75
76------------------------------9ef8d6205763--
77</protocol>
78</verify>
79</testcase>
80