tor-browser

The Tor Browser
git clone https://git.dasho.dev/tor-browser.git
Log | Files | Refs | README | LICENSE

send-redirect-infinite-sync.htm (1053B)


      1 <!doctype html>
      2 <html>
      3  <head>
      4    <title>XMLHttpRequest: send() - Redirects (infinite loop; sync)</title>
      5    <script src="/resources/testharness.js"></script>
      6    <script src="/resources/testharnessreport.js"></script>
      7    <link rel="help" href="https://xhr.spec.whatwg.org/#infrastructure-for-the-send()-method" data-tested-assertations="following::dl[1]/dt[2] following::dl[1]/dd[2]/p[1]" />
      8    <link rel="help" href="https://xhr.spec.whatwg.org/#network-error" data-tested-assertations=".." />
      9    <link rel="help" href="https://xhr.spec.whatwg.org/#request-error" data-tested-assertations="following::ol[1]/li[5]" />
     10  </head>
     11  <body>
     12    <div id="log"></div>
     13    <script>
     14      function redirect(code) {
     15        test(function() {
     16          var client = new XMLHttpRequest()
     17          client.open("GET", "resources/infinite-redirects.py?type="+code, false)
     18          assert_throws_dom("NetworkError", function() { client.send(null) })
     19        }, document.title + " (" + code + ")")
     20      }
     21      redirect("301")
     22    </script>
     23  </body>
     24 </html>