quickjs-tart

quickjs-based runtime for wallet-core logic
Log | Files | Refs | README | LICENSE

test277 (1067B)


      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: Tue, 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 <features>
     24 Mime
     25 </features>
     26 <server>
     27 http
     28 </server>
     29 <name>
     30 HTTP RFC1867-type formposting with custom Content-Type
     31 </name>
     32 <command>
     33 http://%HOSTIP:%HTTPPORT/want/%TESTNUMBER -F name=daniel -H "Content-Type: text/info"
     34 </command>
     35 </client>
     36 
     37 # Verify data after the test has been "shot"
     38 <verify>
     39 <strippart>
     40 s/^--------------------------[A-Za-z0-9]*/--------------------------/
     41 s/boundary=------------------------[A-Za-z0-9]*/boundary=------------------------/
     42 </strippart>
     43 <protocol>
     44 POST /want/%TESTNUMBER HTTP/1.1
     45 Host: %HOSTIP:%HTTPPORT
     46 User-Agent: curl/%VERSION
     47 Accept: */*
     48 Content-Length: 158
     49 Content-Type: text/info; boundary=------------------------
     50 
     51 --------------------------
     52 Content-Disposition: attachment; name="name"
     53 
     54 daniel
     55 ----------------------------
     56 </protocol>
     57 </verify>
     58 </testcase>