quickjs-tart

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

test584 (1368B)


      1 <testcase>
      2 <info>
      3 <keywords>
      4 HTTP
      5 HTTP POST
      6 HTTP MIME
      7 </keywords>
      8 </info>
      9 
     10 #
     11 # Server-side
     12 <reply>
     13 <data>
     14 HTTP/1.1 200 OK swsclose
     15 Date: Tue, 09 Nov 2010 14:49:00 GMT
     16 Server: test-server/fake
     17 Content-Length: 3
     18 
     19 OK
     20 </data>
     21 <datacheck>
     22 HTTP/1.1 200 OK swsclose
     23 Date: Tue, 09 Nov 2010 14:49:00 GMT
     24 Server: test-server/fake
     25 Content-Length: 3
     26 
     27 OK
     28 HTTP/1.1 200 OK swsclose
     29 Date: Tue, 09 Nov 2010 14:49:00 GMT
     30 Server: test-server/fake
     31 Content-Length: 3
     32 
     33 OK
     34 </datacheck>
     35 </reply>
     36 
     37 # Client-side
     38 <client>
     39 <features>
     40 Mime
     41 </features>
     42 <server>
     43 http
     44 </server>
     45 # tool to invoke
     46 <tool>
     47 lib589
     48 </tool>
     49 
     50 <name>
     51 CURLOPT_MIMEPOST first set then set to NULL
     52 </name>
     53 <command>
     54 http://%HOSTIP:%HTTPPORT/%TESTNUMBER
     55 </command>
     56 </client>
     57 
     58 #
     59 # Verify data after the test has been "shot"
     60 <verify>
     61 <strippart>
     62 s/^--------------------------[A-Za-z0-9]*/--------------------------/
     63 s/boundary=------------------------[A-Za-z0-9]*/boundary=------------------------/
     64 </strippart>
     65 <protocol>
     66 POST /%TESTNUMBER HTTP/1.1
     67 Host: %HOSTIP:%HTTPPORT
     68 Accept: */*
     69 Content-Length: 156
     70 Content-Type: multipart/form-data; boundary=------------------------
     71 
     72 --------------------------
     73 Content-Disposition: form-data; name="fake"
     74 
     75 party
     76 ----------------------------
     77 POST /%TESTNUMBER HTTP/1.1
     78 Host: %HOSTIP:%HTTPPORT
     79 Accept: */*
     80 Content-Length: 0
     81 
     82 </protocol>
     83 </verify>
     84 </testcase>