quickjs-tart

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

test356 (1304B)


      1 <testcase>
      2 <info>
      3 <keywords>
      4 HTTP
      5 Alt-Svc
      6 </keywords>
      7 </info>
      8 
      9 #
     10 # Server-side
     11 <reply>
     12 <data>
     13 HTTP/1.1 200 OK
     14 Date: Tue, 09 Nov 2010 14:49:00 GMT
     15 Content-Length: 6
     16 Connection: close
     17 Content-Type: text/html
     18 Funny-head: yesyes
     19 Alt-Svc: h1="nowhere.foo:-1"
     20 Alt-Svc: h1="nowhere.foo:-18446744073709551614"
     21 Alt-Svc: h1="nowhere.foo:81", un-kno22!wn=":82"
     22 Alt-Svc: h1="nowhere.foo:70000"
     23 
     24 -foo-
     25 </data>
     26 </reply>
     27 
     28 #
     29 # Client-side
     30 <client>
     31 <features>
     32 Debug
     33 alt-svc
     34 </features>
     35 <server>
     36 http
     37 </server>
     38 <name>
     39 parse incoming Alt-Svc and save to file
     40 </name>
     41 <setenv>
     42 # make debug-curl accept Alt-Svc over plain HTTP
     43 CURL_ALTSVC_HTTP="yeah"
     44 </setenv>
     45 <command>
     46 http://%HOSTIP:%HTTPPORT/%TESTNUMBER --alt-svc "%LOGDIR/altsvc-%TESTNUMBER"
     47 </command>
     48 </client>
     49 
     50 #
     51 # Verify data after the test has been "shot"
     52 <verify>
     53 <protocol>
     54 GET /%TESTNUMBER HTTP/1.1
     55 Host: %HOSTIP:%HTTPPORT
     56 User-Agent: curl/%VERSION
     57 Accept: */*
     58 
     59 </protocol>
     60 <stripfile>
     61 # strip out the (dynamic) expire date from the file so that the rest
     62 # matches
     63 s/\"([^\"]*)\"/TIMESTAMP/
     64 </stripfile>
     65 <file name="%LOGDIR/altsvc-%TESTNUMBER" mode="text">
     66 # Your alt-svc cache. https://curl.se/docs/alt-svc.html
     67 # This file was generated by libcurl! Edit at your own risk.
     68 h1 %HOSTIP %HTTPPORT h1 nowhere.foo 81 TIMESTAMP 0 0
     69 </file>
     70 </verify>
     71 </testcase>