xref: /curl/tests/data/test173 (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: 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 RFC1867-formpost a file from stdin with "faked" filename
32</name>
33<command>
34http://%HOSTIP:%HTTPPORT/we/want/%TESTNUMBER -F field1=contents1 -F "fileupload=@-;filename=/dev/null;type=text/x-null;format=x-curl"
35</command>
36
37<stdin>
38line1
39line2
40line3
41line4
42line5
43line6
44line7
45line8
46</stdin>
47</client>
48
49# Verify data after the test has been "shot"
50<verify>
51<strip>
52^(Content-Type: multipart/form-data;|------------).*
53</strip>
54<protocol>
55POST /we/want/%TESTNUMBER HTTP/1.1
56Host: %HOSTIP:%HTTPPORT
57User-Agent: curl/%VERSION
58Accept: */*
59Content-Length: 378
60Content-Type: multipart/form-data; boundary=----------------------------5dbea401cd8c
61
62------------------------------5dbea401cd8c
63Content-Disposition: form-data; name="field1"
64
65contents1
66------------------------------5dbea401cd8c
67Content-Disposition: form-data; name="fileupload"; filename="/dev/null"
68Content-Type: text/x-null;format=x-curl
69
70line1
71line2
72line3
73line4
74line5
75line6
76line7
77line8
78
79------------------------------5dbea401cd8c--
80</protocol>
81</verify>
82</testcase>
83