quickjs-tart

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

test173 (1352B)


      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: Tue, 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 <features>
     25 Mime
     26 </features>
     27 <server>
     28 http
     29 </server>
     30 <name>
     31 HTTP RFC1867-formpost a file from stdin with "faked" filename
     32 </name>
     33 <command>
     34 http://%HOSTIP:%HTTPPORT/we/want/%TESTNUMBER -F field1=contents1 -F "fileupload=@-;filename=%DEV_NULL;type=text/x-null;format=x-curl"
     35 </command>
     36 
     37 <stdin>
     38 line1
     39 line2
     40 line3
     41 line4
     42 line5
     43 line6
     44 line7
     45 line8
     46 </stdin>
     47 </client>
     48 
     49 # Verify data after the test has been "shot"
     50 <verify>
     51 <strip>
     52 ^(Content-Type: multipart/form-data;|------------).*
     53 </strip>
     54 <protocol>
     55 POST /we/want/%TESTNUMBER HTTP/1.1
     56 Host: %HOSTIP:%HTTPPORT
     57 User-Agent: curl/%VERSION
     58 Accept: */*
     59 Content-Length: 378
     60 Content-Type: multipart/form-data; boundary=----------------------------5dbea401cd8c
     61 
     62 ------------------------------5dbea401cd8c
     63 Content-Disposition: form-data; name="field1"
     64 
     65 contents1
     66 ------------------------------5dbea401cd8c
     67 Content-Disposition: form-data; name="fileupload"; filename="%DEV_NULL"
     68 Content-Type: text/x-null;format=x-curl
     69 
     70 line1
     71 line2
     72 line3
     73 line4
     74 line5
     75 line6
     76 line7
     77 line8
     78 
     79 ------------------------------5dbea401cd8c--
     80 </protocol>
     81 </verify>
     82 </testcase>