Git init
[external/curl.git] / tests / data / test173
1 <testcase>
2 <info>
3 <keywords>
4 HTTP
5 HTTP POST
6 </keywords>
7 </info>
8
9 # Server-side
10 <reply>
11 <data>
12 HTTP/1.1 200 OK swsclose
13 Date: Thu, 09 Nov 2010 14:49:00 GMT
14 Server: test-server/fake
15 Content-Length: 11
16
17 blablabla
18
19 </data>
20 </reply>
21
22 # Client-side
23 <client>
24 <server>
25 http
26 </server>
27  <name>
28 HTTP RFC1867-formpost a file from stdin with "faked" filename
29  </name>
30  <command>
31 http://%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>
35 line1
36 line2
37 line3
38 line4
39 line5
40 line6
41 line7
42 line8
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>
52 POST /we/want/173 HTTP/1.1\r
53 User-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\r
54 Host: %HOSTIP:%HTTPPORT\r
55 Accept: */*\r
56 Content-Length: 360\r
57 Expect: 100-continue\r
58 Content-Type: multipart/form-data; boundary=----------------------------5dbea401cd8c\r
59 \r
60 ------------------------------5dbea401cd8c\r
61 Content-Disposition: form-data; name="field1"\r
62 \r
63 contents1\r
64 ------------------------------5dbea401cd8c\r
65 Content-Disposition: form-data; name="fileupload"; filename="/dev/null"\r
66 Content-Type: text/x-null;format=x-curl\r
67 \r
68 line1
69 line2
70 line3
71 line4
72 line5
73 line6
74 line7
75 line8
76 \r
77 ------------------------------5dbea401cd8c--\r
78 </protocol>
79 </verify>
80 </testcase>