Home | History | Annotate | Download | only in data
      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: 10
     16 
     17 blablabla
     18 </data>
     19 </reply>
     20 
     21 # Client-side
     22 <client>
     23 <server>
     24 http
     25 </server>
     26  <name>
     27 HTTP multipart formpost with contents from a file
     28  </name>
     29  <command>
     30 http://%HOSTIP:%HTTPPORT/we/want/163 -F "name=<log/field163" -F tool=curl
     31 </command>
     32 # We create this file before the command is invoked!
     33 <file name="log/field163">
     34 contents
     35 from
     36 a
     37 file
     38 
     39 newlinens?
     40 yes please
     41         
     42 [tab][CR] too
     43 </file>
     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/163 HTTP/1.1
     53 User-Agent: curl/7.11.2-CVS (i686-pc-linux-gnu) libcurl/7.11.2-CVS OpenSSL/0.9.6b zlib/1.1.4 c-ares/1.0.0
     54 Host: %HOSTIP:%HTTPPORT
     55 Accept: */*
     56 Content-Length: 304
     57 Expect: 100-continue
     58 Content-Type: multipart/form-data; boundary=----------------------------c2d1767eb6ac
     59 
     60 ------------------------------c2d1767eb6ac
     61 Content-Disposition: form-data; name="name"
     62 
     63 contents
     64 from
     65 a
     66 file
     67 
     68 newlinens?
     69 yes please
     70         
     71 [tab][CR] too
     72 
     73 ------------------------------c2d1767eb6ac
     74 Content-Disposition: form-data; name="tool"
     75 
     76 curl
     77 ------------------------------c2d1767eb6ac--
     78 </protocol>
     79 </verify>
     80 </testcase>
     81