quickjs-tart

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

test421 (2540B)


      1 <testcase>
      2 <info>
      3 <keywords>
      4 header_json
      5 </keywords>
      6 </info>
      7 
      8 #
      9 # Server-side
     10 <reply>
     11 <data crlf="yes">
     12 HTTP/1.1 200 OK
     13 server: nginx
     14 date: Tue, 07 Mar 2023 15:14:41 GMT
     15 content-type: application/json
     16 content-length: 6
     17 vary: Accept-Encoding
     18 access-control-allow-origin: *
     19 vary: Accept-Encoding
     20 referrer-policy: strict-origin-when-cross-origin
     21 access-control-allow-methods: GET, POST, PUT, DELETE, OPTIONS
     22 access-control-max-age: 1728000
     23 access-control-allow-headers: Authorization, Content-Type, AuthorizationOauth, X-EARLY-ACCESS
     24 access-control-expose-headers: 
     25 vary: Accept
     26 etag: W/"2678f9ab2ba550d164e7cc014aefd31e"
     27 cache-control: max-age=0, private, must-revalidate
     28 x-request-id: 375b343b3d2ecf9b442c0daf00fc4a9a
     29 strict-transport-security: max-age=31536000; includeSubDomains
     30 x-content-type-options: nosniff
     31 x-xss-protection: 1; mode=block
     32 referrer-policy: strict-origin-when-cross-origin
     33 feature-policy: accelerometer 'none'; camera 'none'; geolocation 'none'; gyroscope 'none'; magnetometer 'none'; microphone 'none'; payment 'none'; usb 'none'
     34 
     35 -foo-
     36 </data>
     37 </reply>
     38 
     39 #
     40 # Client-side
     41 <client>
     42 <server>
     43 http
     44 </server>
     45 <name>
     46 HTTP GET multiple headers and %{header_json}
     47 </name>
     48 <command>
     49 http://%HOSTIP:%HTTPPORT/%TESTNUMBER -w '%{stderr}%{header_json}\n' -s
     50 </command>
     51 </client>
     52 
     53 #
     54 # Verify data after the test has been "shot"
     55 <verify>
     56 <protocol crlf="yes">
     57 GET /%TESTNUMBER HTTP/1.1
     58 Host: %HOSTIP:%HTTPPORT
     59 User-Agent: curl/%VERSION
     60 Accept: */*
     61 
     62 </protocol>
     63 <stderr mode="text">
     64 {"server":["nginx"],
     65 "date":["Tue, 07 Mar 2023 15:14:41 GMT"],
     66 "content-type":["application/json"],
     67 "content-length":["6"],
     68 "vary":["Accept-Encoding","Accept-Encoding","Accept"],
     69 "access-control-allow-origin":["*"],
     70 "referrer-policy":["strict-origin-when-cross-origin","strict-origin-when-cross-origin"],
     71 "access-control-allow-methods":["GET, POST, PUT, DELETE, OPTIONS"],
     72 "access-control-max-age":["1728000"],
     73 "access-control-allow-headers":["Authorization, Content-Type, AuthorizationOauth, X-EARLY-ACCESS"],
     74 "access-control-expose-headers":[""],
     75 "etag":["W/\"2678f9ab2ba550d164e7cc014aefd31e\""],
     76 "cache-control":["max-age=0, private, must-revalidate"],
     77 "x-request-id":["375b343b3d2ecf9b442c0daf00fc4a9a"],
     78 "strict-transport-security":["max-age=31536000; includeSubDomains"],
     79 "x-content-type-options":["nosniff"],
     80 "x-xss-protection":["1; mode=block"],
     81 "feature-policy":["accelerometer 'none'; camera 'none'; geolocation 'none'; gyroscope 'none'; magnetometer 'none'; microphone 'none'; payment 'none'; usb 'none'"]
     82 }
     83 </stderr>
     84 </verify>
     85 </testcase>