xref: /curl/tests/data/test71 (revision 3fd80c7b)
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: Tue, 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<features>
25Mime
26</features>
27<server>
28http
29</server>
30<name>
31HTTP and -F upload in config file
32</name>
33<stdin>
34-F name=daniel
35-F tool=curl
36-F file=@%LOGDIR/test%TESTNUMBER.txt
37user-agent = ""
38</stdin>
39<command>
40http://%HOSTIP:%HTTPPORT/we/want/%TESTNUMBER -K -
41</command>
42# We create this file before the command is invoked!
43<file name="%LOGDIR/test%TESTNUMBER.txt">
44foo-
45This is a moo-
46bar
47</file>
48</client>
49
50# Verify data after the test has been "shot"
51<verify>
52<strip>
53^(Content-Type: multipart/form-data;|------------).*
54</strip>
55<protocol>
56POST /we/want/%TESTNUMBER HTTP/1.1
57Host: %HOSTIP:%HTTPPORT
58Accept: */*
59Content-Length: 432
60Content-Type: multipart/form-data; boundary=----------------------------9ef8d6205763
61
62------------------------------9ef8d6205763
63Content-Disposition: form-data; name="name"
64
65daniel
66------------------------------9ef8d6205763
67Content-Disposition: form-data; name="tool"
68
69curl
70------------------------------9ef8d6205763
71Content-Disposition: form-data; name="file"; filename="test%TESTNUMBER.txt"
72Content-Type: text/plain
73
74foo-
75This is a moo-
76bar
77
78------------------------------9ef8d6205763--
79</protocol>
80</verify>
81</testcase>
82