quickjs-tart

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

test493 (1247B)


      1 <testcase>
      2 <info>
      3 <keywords>
      4 HTTP
      5 HTTP proxy
      6 HSTS
      7 url_effective
      8 </keywords>
      9 </info>
     10 
     11 <reply>
     12 
     13 # we use this as response to a CONNECT
     14 <connect nocheck="yes">
     15 HTTP/1.1 403 not OK at all
     16 Date: Tue, 09 Nov 2010 14:49:00 GMT
     17 Server: test-server/fake
     18 Content-Length: 6
     19 Connection: close
     20 Funny-head: yesyes
     21 
     22 -foo-
     23 </connect>
     24 </reply>
     25 
     26 <client>
     27 <server>
     28 http
     29 </server>
     30 <features>
     31 HSTS
     32 proxy
     33 https
     34 </features>
     35 
     36 <file name="%LOGDIR/input%TESTNUMBER">
     37 .hsts.example "99991001 04:47:41"
     38 </file>
     39 
     40 <name>
     41 HSTS and %{url_effective} after upgrade
     42 </name>
     43 <command>
     44 -x http://%HOSTIP:%HTTPPORT http://this.hsts.example/%TESTNUMBER --hsts %LOGDIR/input%TESTNUMBER -w '%{url_effective}\n'
     45 </command>
     46 <disable>
     47 test-duphandle
     48 </disable>
     49 </client>
     50 
     51 <verify>
     52 # we let it CONNECT to the server to confirm HSTS but deny from there
     53 <protocol>
     54 CONNECT this.hsts.example:443 HTTP/1.1
     55 Host: this.hsts.example:443
     56 User-Agent: curl/%VERSION
     57 Proxy-Connection: Keep-Alive
     58 
     59 </protocol>
     60 <stdout>
     61 HTTP/1.1 403 not OK at all
     62 Date: Tue, 09 Nov 2010 14:49:00 GMT
     63 Server: test-server/fake
     64 Content-Length: 6
     65 Connection: close
     66 Funny-head: yesyes
     67 
     68 https://this.hsts.example/%TESTNUMBER
     69 </stdout>
     70 # Proxy CONNECT aborted
     71 <errorcode>
     72 56
     73 </errorcode>
     74 </verify>
     75 </testcase>