Home | History | Annotate | Download | only in data
      1 <testcase>
      2 <info>
      3 <keywords>
      4 HTTP
      5 HTTP FORMPOST
      6 </keywords>
      7 </info>
      8 # Server-side
      9 <reply>
     10 <data>
     11 HTTP/1.1 200 OK swsclose
     12 Date: Thu, 09 Nov 2010 14:49:00 GMT
     13 Server: test-server/fake
     14 Content-Length: 11
     15 
     16 blablabla
     17 
     18 </data>
     19 </reply>
     20 
     21 # Client-side
     22 <client>
     23 <server>
     24 http
     25 </server>
     26  <name>
     27 HTTP RFC1867-type formposting with custom Content-Type
     28  </name>
     29  <command>
     30 http://%HOSTIP:%HTTPPORT/want/277 -F name=daniel -H "Content-Type: text/info"
     31 </command>
     32 </client>
     33 
     34 # Verify data after the test has been "shot"
     35 <verify>
     36 <strip>
     37 ^User-Agent:.*
     38 </strip>
     39 <strippart>
     40 s/^--------------------------[a-z0-9]*/--------------------------/
     41 s/boundary=------------------------[a-z0-9]*/boundary=------------------------/
     42 </strippart>
     43 <protocol>
     44 POST /want/277 HTTP/1.1
     45 User-Agent: curl/7.10.4 (i686-pc-linux-gnu) libcurl/7.10.4 OpenSSL/0.9.7a ipv6 zlib/1.1.3
     46 Host: %HOSTIP:%HTTPPORT
     47 Accept: */*
     48 Content-Length: 145
     49 Expect: 100-continue
     50 Content-Type: text/info; boundary=------------------------
     51 
     52 --------------------------
     53 Content-Disposition: form-data; name="name"
     54 
     55 daniel
     56 ----------------------------
     57 </protocol>
     58 </verify>
     59 </testcase>
     60