quickjs-tart

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

test1901 (714B)


      1 <testcase>
      2 <info>
      3 <keywords>
      4 HTTP
      5 HTTP POST
      6 CURLOPT_READFUNCTION
      7 </keywords>
      8 </info>
      9 
     10 # Server-side
     11 <reply>
     12 <data crlf="yes" nocheck="yes">
     13 HTTP/1.1 200 OK
     14 Content-Length: 6
     15 Content-Type: text/html
     16 
     17 -foo-
     18 </data>
     19 </reply>
     20 
     21 # Client-side
     22 <client>
     23 <server>
     24 http
     25 </server>
     26 
     27 <name>
     28 Chunked HTTP POST from callback with CURLOPT_POSTFIELDSIZE set
     29 </name>
     30 <tool>
     31 lib%TESTNUMBER
     32 </tool>
     33 
     34 <command>
     35 http://%HOSTIP:%HTTPPORT/boom
     36 </command>
     37 </client>
     38 
     39 # Verify data after the test has been "shot"
     40 <verify>
     41 <protocol crlf="yes">
     42 POST /boom HTTP/1.1
     43 Host: %HOSTIP:%HTTPPORT
     44 Accept: */*
     45 Transfer-Encoding: chunked
     46 Content-Type: application/x-www-form-urlencoded
     47 
     48 3
     49 one
     50 3
     51 two
     52 5
     53 three
     54 4
     55 four
     56 0
     57 
     58 </protocol>
     59 </verify>
     60 </testcase>