quickjs-tart

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

test2073 (1187B)


      1 <testcase>
      2 <info>
      3 <keywords>
      4 HTTP
      5 HTTP FORMPOST
      6 </keywords>
      7 </info>
      8 #
      9 # Server-side
     10 <reply>
     11 <data>
     12 HTTP/1.1 200 OK
     13 Date: Tue, 09 Nov 2010 14:49:00 GMT
     14 Content-Length: 10
     15 
     16 contents1
     17 </data>
     18 <data1>
     19 HTTP/1.1 200 OK
     20 Date: Tue, 09 Nov 2010 14:49:00 GMT
     21 Content-Length: 10
     22 
     23 contents2
     24 </data1>
     25 </reply>
     26 
     27 #
     28 # Client-side
     29 <client>
     30 <features>
     31 Mime
     32 </features>
     33 <server>
     34 http
     35 </server>
     36 <name>
     37 HTTP form posts with handle reset
     38 </name>
     39 <command>
     40 http://%HOSTIP:%HTTPPORT/%TESTNUMBER -F 'name=a;filename=a.pdf' --next http://%HOSTIP:%HTTPPORT/%TESTNUMBER -F 'name=b;filename=b.jpg'
     41 </command>
     42 </client>
     43 
     44 #
     45 # Verify data after the test has been "shot"
     46 <verify>
     47 <strip>
     48 ^(Content-Type: multipart/form-data;|------------).*
     49 </strip>
     50 <protocol>
     51 POST /%TESTNUMBER HTTP/1.1
     52 Host: %HOSTIP:%HTTPPORT
     53 User-Agent: curl/%VERSION
     54 Accept: */*
     55 Content-Length: 201
     56 
     57 Content-Disposition: form-data; name="name"; filename="a.pdf"
     58 Content-Type: application/pdf
     59 
     60 a
     61 POST /%TESTNUMBER HTTP/1.1
     62 Host: %HOSTIP:%HTTPPORT
     63 User-Agent: curl/%VERSION
     64 Accept: */*
     65 Content-Length: 196
     66 
     67 Content-Disposition: form-data; name="name"; filename="b.jpg"
     68 Content-Type: image/jpeg
     69 
     70 b
     71 </protocol>
     72 </verify>
     73 </testcase>