1<testcase>
2<info>
3<keywords>
4HTTP
5HTTP POST
6</keywords>
7</info>
8
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 RFC1867-formpost a file from stdin with "faked" filename
29 </name>
30 <command>
31http://%HOSTIP:%HTTPPORT/we/want/173 -F field1=contents1 -F "fileupload=@-;filename=/dev/null;type=text/x-null;format=x-curl"
32</command>
33
34<stdin>
35line1
36line2
37line3
38line4
39line5
40line6
41line7
42line8
43</stdin>
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/173 HTTP/1.1
53User-Agent: curl/7.12.1-CVS (i686-pc-linux-gnu) libcurl/7.12.1-CVS OpenSSL/0.9.6b ipv6 zlib/1.1.4 GSS libidn/0.4.6
54Host: %HOSTIP:%HTTPPORT
55Accept: */*
56Content-Length: 360
57Expect: 100-continue
58Content-Type: multipart/form-data; boundary=----------------------------5dbea401cd8c
59
60------------------------------5dbea401cd8c
61Content-Disposition: form-data; name="field1"
62
63contents1
64------------------------------5dbea401cd8c
65Content-Disposition: form-data; name="fileupload"; filename="/dev/null"
66Content-Type: text/x-null;format=x-curl
67
68line1
69line2
70line3
71line4
72line5
73line6
74line7
75line8
76
77------------------------------5dbea401cd8c--
78</protocol>
79</verify>
80</testcase>
81