tor-browser

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

open-method-case-insensitive.htm (918B)


      1 <!DOCTYPE html>
      2 <html>
      3  <head>
      4    <title>XMLHttpRequest: open() - case-insensitive methods test</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/#the-open()-method" data-tested-assertations="following::ol/li[5]" />
      8 
      9  </head>
     10  <body>
     11    <div id="log"></div>
     12    <script>
     13      function method(method) {
     14        test(function() {
     15          var client = new XMLHttpRequest()
     16          client.open(method, "resources/content.py", false)
     17          client.send(null)
     18          assert_equals(client.getResponseHeader("x-request-method"), method.toUpperCase())
     19        }, document.title + " (" + method.toUpperCase() + ")")
     20      }
     21      method("deLETE")
     22      method("get")
     23      method("heAd")
     24      method("OpTIOns")
     25      method("post")
     26      method("Put")
     27    </script>
     28  </body>
     29 </html>