quickjs-tart

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

test1072 (1496B)


      1 <testcase>
      2 # Authorization 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 Digest auth
     10 --anyauth
     11 HTTP/1.0
     12 chunked Transfer-Encoding
     13 </keywords>
     14 </info>
     15 
     16 # Server-side
     17 <reply>
     18 <data>
     19 HTTP/1.0 401 Authorization Required swsclose
     20 Server: testcurl
     21 WWW-Authenticate: Blackmagic realm="gimme all yer s3cr3ts"
     22 WWW-Authenticate: Basic realm="gimme all yer s3cr3ts"
     23 WWW-Authenticate: Digest realm="gimme all yer s3cr3ts", nonce="11223344"
     24 Content-Type: text/plain
     25 Content-Length: 0
     26 Connection: close
     27 
     28 </data>
     29 </reply>
     30 
     31 # Client-side
     32 <client>
     33 <server>
     34 http
     35 </server>
     36 <features>
     37 crypto
     38 </features>
     39 <name>
     40 HTTP chunked PUT to HTTP 1.0 server with authorization
     41 </name>
     42 <command>
     43 http://%HOSTIP:%HTTPPORT/%TESTNUMBER -T - -u testuser:testpass --anyauth
     44 </command>
     45 <stdin>
     46 This is data we upload with PUT
     47 it comes from stdin so MUST be sent
     48 with chunked encoding
     49 which is impossible in HTTP/1.0
     50 </stdin>
     51 </client>
     52 
     53 # Verify data after the test has been "shot"
     54 <verify>
     55 <errorcode>
     56 25
     57 </errorcode>
     58 <protocol>
     59 PUT /%TESTNUMBER HTTP/1.1
     60 Host: %HOSTIP:%HTTPPORT
     61 User-Agent: curl/%VERSION
     62 Accept: */*
     63 Transfer-Encoding: chunked
     64 Expect: 100-continue
     65 
     66 7a
     67 This is data we upload with PUT
     68 it comes from stdin so MUST be sent
     69 with chunked encoding
     70 which is impossible in HTTP/1.0
     71 
     72 0
     73 
     74 </protocol>
     75 </verify>
     76 </testcase>