quickjs-tart

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

test1976 (1281B)


      1 <testcase>
      2 <info>
      3 <keywords>
      4 HTTP
      5 CURLOPT_AWS_SIGV4
      6 </keywords>
      7 </info>
      8 
      9 # Server-side
     10 <reply>
     11 <data>
     12 HTTP/1.1 200 OK
     13 Date: Thu, 09 Nov 2010 14:49:00 GMT
     14 Server: test-server/fake
     15 Content-Length: 0
     16 
     17 </data>
     18 </reply>
     19 
     20 # Client-side
     21 <client>
     22 <server>
     23 http
     24 </server>
     25 <features>
     26 SSL
     27 Debug
     28 crypto
     29 aws
     30 </features>
     31 <name>
     32 HTTP AWS_SIGV4 canonical request header sorting test
     33 </name>
     34 <command>
     35 -X PUT -H "X-Amz-Meta-Test-Two: test2" -H "x-amz-meta-test: test" --aws-sigv4 "aws:amz:us-east-1:s3" -u "xxx:yyy" http://%HOSTIP:%HTTPPORT/%TESTNUMBER
     36 </command>
     37 </client>
     38 
     39 # Verify data after the test has been "shot"
     40 <verify>
     41 <strip>
     42 ^User-Agent:.*
     43 ^Content-Length:.*
     44 ^Accept:.*
     45 </strip>
     46 <strippart>
     47 # Strip the actual signature. We only care about header order in this test
     48 s/Signature=[a-f0-9]{64}/Signature=stripped/
     49 </strippart>
     50 <protocol crlf="yes">
     51 PUT /%TESTNUMBER HTTP/1.1
     52 Host: %HOSTIP:%HTTPPORT
     53 Authorization: AWS4-HMAC-SHA256 Credential=xxx/19700101/us-east-1/s3/aws4_request, SignedHeaders=host;x-amz-content-sha256;x-amz-date;x-amz-meta-test;x-amz-meta-test-two, Signature=stripped
     54 X-Amz-Date: 19700101T000000Z
     55 x-amz-content-sha256: e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855
     56 X-Amz-Meta-Test-Two: test2
     57 x-amz-meta-test: test
     58 
     59 </protocol>
     60 </verify>
     61 </testcase>