xref: /curl/tests/data/test166 (revision 3fd80c7b)
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: Tue, 09 Nov 2010 14:49:00 GMT
14Server: test-server/fake
15Content-Length: 10
16
17blablabla
18</data>
19</reply>
20
21# Client-side
22<client>
23<features>
24Mime
25</features>
26<server>
27http
28</server>
29<name>
30HTTP formpost a file with spaces in name
31</name>
32<command>
33http://%HOSTIP:%HTTPPORT/we/want/%TESTNUMBER -F "name=@%LOGDIR/fie ld %TESTNUMBER"
34</command>
35# We create this file before the command is invoked!
36<file name="%LOGDIR/fie ld %TESTNUMBER">
37data inside the file
38</file>
39</client>
40
41# Verify data after the test has been "shot"
42<verify>
43<strip>
44^(Content-Type: multipart/form-data;|------------).*
45</strip>
46<protocol>
47POST /we/want/%TESTNUMBER HTTP/1.1
48Host: %HOSTIP:%HTTPPORT
49User-Agent: curl/%VERSION
50Accept: */*
51Content-Length: 235
52Content-Type: multipart/form-data; boundary=----------------------------b0b3d6d23991
53
54------------------------------b0b3d6d23991
55Content-Disposition: form-data; name="name"; filename="fie ld %TESTNUMBER"
56Content-Type: application/octet-stream
57
58data inside the file
59
60------------------------------b0b3d6d23991--
61</protocol>
62</verify>
63</testcase>
64