quickjs-tart

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

test1073 (1256B)


      1 <testcase>
      2 # Redirection is used to force curl to realize that the server is
      3 # speaking HTTP 1.0. The request is impossible to satisfy with HTTP 1.0
      4 # because chunked encoding is unavailable, so the request must fail.
      5 <info>
      6 <keywords>
      7 HTTP
      8 HTTP PUT
      9 HTTP/1.0
     10 followlocation
     11 chunked Transfer-Encoding
     12 </keywords>
     13 </info>
     14 
     15 # Server-side
     16 <reply>
     17 <data>
     18 HTTP/1.0 301 Redirect swsclose
     19 Server: testcurl
     20 Content-Type: text/plain
     21 Location: /newlocation/%TESTNUMBER0002
     22 Content-Length: 0
     23 Connection: close
     24 
     25 </data>
     26 </reply>
     27 
     28 # Client-side
     29 <client>
     30 <server>
     31 http
     32 </server>
     33 <name>
     34 HTTP chunked PUT to HTTP 1.0 server with redirect
     35 </name>
     36 <command>
     37 http://%HOSTIP:%HTTPPORT/%TESTNUMBER -T - -L
     38 </command>
     39 <stdin>
     40 This is data we upload with PUT
     41 it comes from stdin so MUST be sent
     42 with chunked encoding
     43 which is impossible in HTTP/1.0
     44 </stdin>
     45 </client>
     46 
     47 # Verify data after the test has been "shot"
     48 <verify>
     49 <errorcode>
     50 25
     51 </errorcode>
     52 <protocol>
     53 PUT /%TESTNUMBER HTTP/1.1
     54 Host: %HOSTIP:%HTTPPORT
     55 User-Agent: curl/%VERSION
     56 Accept: */*
     57 Transfer-Encoding: chunked
     58 Expect: 100-continue
     59 
     60 7a
     61 This is data we upload with PUT
     62 it comes from stdin so MUST be sent
     63 with chunked encoding
     64 which is impossible in HTTP/1.0
     65 
     66 0
     67 
     68 </protocol>
     69 </verify>
     70 </testcase>