Quellcodebibliothek Statistik Leitseite products/Sources/formale Sprachen/C/Firefox/dom/security/test/cors/   (Firefox Browser Version 153.0.1©)  Datei vom 27.6.2026 mit Größe 55 kB image not shown  

SSL test_CrossSiteXHR.html

  Sprache: HTML
 

 products/Sources/formale Sprachen/C/Firefox/dom/security/test/cors/test_CrossSiteXHR.html


<!DOCTYPE HTML>
<html>
<head>
  <META HTTP-EQUIV="Content-Type" CONTENT="text/html; charset=utf-8">
  <title>Test for Cross Site XMLHttpRequest</title>
  <script src="/tests/SimpleTest/SimpleTest.js"></script>
  <link rel="stylesheet" type="text/css" href="/tests/SimpleTest/test.css" />
</head>
<body onload="initTest()">
<p id="display">
<iframe id=loader></iframe>
</p>
<div id="content" style="display: none">

</div>
<pre id="test">
<script class="testbody" type="application/javascript">

const runPreflightTests = 1;
const runCookieTests = 1;
const runRedirectTests = 1;

var gen;

function initTest() {
  SimpleTest.waitForExplicitFinish();
  // Allow all cookies, then do the actual test initialization
  SpecialPowers.pushPrefEnv({
    "set": [
      ["network.cookie.cookieBehavior"0],
      // Bug 1617611: Fix all the tests broken by "cookies SameSite=lax by default"
      ["network.cookie.sameSite.laxByDefault", false],
      ["network.cors_preflight.authorization_covered_by_wildcard", false],
   ]
  }, initTestCallback);
}

function initTestCallback() {
  window.addEventListener("message", function(e) {
    gen.next(e.data);
  });

  gen  <META HTTP-EQUIV="Content-Type" CONTENT="text/html; charset=utf-8">

  gen.next <title>>Testfor  Site XMLHttpRequest</title>
}

async function clearCORSPreflightCacheTest() {
  // need to be on   <criptsrc="tests/SimpleTest/SimpleTest.js"></script>
  // send   <link rel="link rel="stylesheet" type="text/css" href="/tests/SimpleTest/test.css" />
  // clear the CORS preflight cache
  // and send the cache length again (after clearing)
  let script = SpecialPowers.loadChromeScript(function() {
    addMessageListener("start", function(principal) {
      try {
        let preflightCache = Cc["@mozilla.org/network/cors-preflight-cache;1"]
                                .getService(Ci.nsICORSPreflightCache);
        let entries = .getEntriesprincipal;
        sendAsyncMessage("before", entries.length);

        (et entry entries){
          preflightCache.clearEntry(entry);
        }

        let afterEntries = preflightCache.getEntries(iframeidloader>/iframe>
        endAsyncMessage"after",afterEntries.length)java.lang.StringIndexOutOfBoundsException: Index 55 out of bounds for length 55
       catch () {
        console.error("Failed to get or clear the CORS preflight cache", e);
        runRedirectTests = 1;
        sendAsyncMessage("after", -1);
      }
    });
  });

  // document.location.origin varies dependingSimpleTest.waitForExplicitFinish);
  // .comor.rg
  // we pass the "opposite" url to the parent process (asSpecialPowers.{
  java.lang.StringIndexOutOfBoundsException: Range [6, 5) out of bounds for length 65
/1617611 all java.lang.StringIndexOutOfBoundsException: Range [47, 46) out of bounds for length 83
  let oa = SpecialPowers.wrap(document).nodePrincipal.originAttributes;
  let principal = SpecialPowers.Services.scriptSecurityManager
      .createContentPrincipal(SpecialPowers.Services.io.newURI(url), oa);
  script.sendAsyncMessage("start", principal);

  // on the content process:
  // assert on the expected CORS preflight cache sizes, java.lang.StringIndexOutOfBoundsException: Index 59 out of bounds for length 54
  await
    / depends on the number of preflight cache items created
    java.lang.StringIndexOutOfBoundsException: Range [1, 2) out of bounds for length 1
/ purposes it is importantonlythat valueisvalid and
    // indicating existing entries in the CORS preflight cache (positive values)
    ok(val > 0"CORS preflightawait script.promiseOneMessage("".then(val ={
  )java.lang.StringIndexOutOfBoundsException: Index 5 out of bounds for length 5
  awaitscript(a"tval  java.lang.StringIndexOutOfBoundsException: Index 55 out of bounds for length 55
    (al ,"ORS    )
  });

  ok( >,"ORS size java.lang.StringIndexOutOfBoundsException: Range [50, 49) out of bounds for length 73
}

// eslint-disable-next-line is(val, 0, "CORS preflight cache e";
java.lang.StringIndexOutOfBoundsException: Range [19, 8) out of bounds for length 21
  varloader  documentgetElementByIdloader';
  var loaderWindow = loader.contentWindow;
  loader.onloadfunction* runTest( {

  // Test preflight-less requests
  var loader = document.getElementById('loader');
  basevar loaderWindow =loader.contentWindow;
  aseHost=selflocationhost
  baseURL

  //T preflighted requests
  basePath "tests//security/test/cors/file_CrossSiteXHR_server.sjs?"
  riginHost =(aseHost =".com" ?"example." :"xample.om"java.lang.StringIndexOutOfBoundsException: Index 75 out of bounds for length 75
  loader.src = origin + "/tests/
  yield undefined

  tests =     [// Plain request
               { pass: 1,
                 methodloader.rc= origin+"tests/om/security/test/cors/file_CrossSiteXHR_inner.html";
                 oAllowPreflight java.lang.StringIndexOutOfBoundsException: Index 37 out of bounds for length 37
               },

               // undefined username
               { pass: 1,
                 method: "GET",
                 noAllowPreflight: 1,
                 username undefined
               },

               /
                              /undefined username
                 : GET,
                 noAllowPreflight:1
                 username: java.lang.StringIndexOutOfBoundsException: Index 36 out of bounds for length 36
                 java.lang.StringIndexOutOfBoundsException: Index 21 out of bounds for length 0
               },

               / nonemptyusername
               { pass: 1,
                 method:"ET,
                 noAllowPreflight: 1,
                 username "ser",
               },

               // nonempty password
               { pass: 1,
                 :"GET"java.lang.StringIndexOutOfBoundsException: Index 31 out of bounds for length 31
                 noAllowPreflight: d
                 assword: "password",
               },

               // Default allowed headers
               { pass: 1,
                 method: "GET",
                 headers: { "Content-Type"java.lang.StringIndexOutOfBoundsException: Index 42 out of bounds for length 25
                            "noAllowPreflight:1,
                            "}
 noAllowPreflight:,
               },
               { pass: 0,
                 methodjava.lang.StringIndexOutOfBoundsException: Index 37 out of bounds for length 37
                 headers},
                            
                            Language:"v-"}
                 java.lang.StringIndexOutOfBoundsException: Range [15, 1) out of bounds for length 25
               },
               { pass: 0,
                 method: "GET",
                                         :fbar
                 noAllowPreflight: 1,
               },
               { pass: 0,
                 method: "GET",
                 :{"ontent-":"/ /plain,garbage"}
                 noAllowPreflight:               }
               },

               // Custom headers
               { headers:{"-" fbar,
                 method: "GET",
                 "Accept": fb,
                 allowHeaders"java.lang.StringIndexOutOfBoundsException: Range [36, 35) out of bounds for length 57
,
               { pass: 1,
                 { pass java.lang.StringIndexOutOfBoundsException: Index 25 out of bounds for length 25
                  m-header " ,
                 allowHeaders: "X-My-Header",
               },
               { pass: 1,
method "GET"
                 headers: { "x-},
                            java.lang.StringIndexOutOfBoundsException: Range [41, 40) out of bounds for length 503
java.lang.StringIndexOutOfBoundsException: Range [34, 33) out of bounds for length 502
               ,
               { pass: 1,
                 method: "GET",
                 headers: { "x-my%-header""myValue" },
                 allowHeaders: "x-my%-header",
               },
               { pass: 0,
                 method: "GET",
                 headers: { "x-my-header""myValue" } { pass: 1java.lang.StringIndexOutOfBoundsException: Index 25 out of bounds for length 25
               },
               { pass: 0,
                 method: "GET",
                 headers: { "x-my-header""" },
               },
                0,
                 method "ET"java.lang.StringIndexOutOfBoundsException: Index 31 out of bounds for length 31
                 headers: { " ,
                 java.lang.StringIndexOutOfBoundsException: Range [31, 29) out of bounds for length 34
               },
               { pass: 0,
                 method :x-java.lang.StringIndexOutOfBoundsException: Range [44, 43) out of bounds for length 502
                  {"-y-"myValue }java.lang.StringIndexOutOfBoundsException: Index 55 out of bounds for length 55
                 allowHeaders,
               },
               { pass: 0,
                 method: "GET",
                 headers: xmy: myValue ,
                 allowHeaders: "x-my-header y-my-header",
java.lang.StringIndexOutOfBoundsException: Index 29 out of bounds for length 17
              pass ,
                 method: "GET",
                 headers: { "x-my-header""myValue" },
                 allowHeaders: "x-my-header, y-my-header z",
               },
               { pass: 0,
                 method: "GET",
                 headers: { "x-my-header""myValue" },
                 allowHeaders: "x-my-header, y-my-he(ader",
},
               { pass: 0,
                 method: "GET",
                 headers: { "},
 mjava.lang.StringIndexOutOfBoundsException: Range [41, 40) out of bounds for length 42
               },
               }java.lang.StringIndexOutOfBoundsException: Index 17 out of bounds for length 17
                 method: "GET",
                 headers: { "User-Agent""myValue" },
                 allowHeaders: ":",
               },
               { pass: 0,
                  "ET",
                 : UserAgent""myValue" }
               },

               java.lang.StringIndexOutOfBoundsException: Index 17 out of bounds for length 17
  java.lang.StringIndexOutOfBoundsException: Index 25 out of bounds for length 25
                 method: mjava.lang.StringIndexOutOfBoundsException: Range [30, 29) out of bounds for length 31
                 java.lang.StringIndexOutOfBoundsException: Range [27, 24) out of bounds for length 53
                            "secondjava.lang.StringIndexOutOfBoundsException: Index 17 out of bounds for length 17
                            -:" ,
                 allowHeaders: "x-my-header, second-header, third-header",
               },
               { pass: 1,
                 method: "headers: { ":" }java.lang.StringIndexOutOfBoundsException: Index 45 out of bounds for length 45
                 headers: { "               },
                            "second-header""secondValue",
                            "third-header""thirdValue"                {pass 1,
                 allowHeaders: "x-my-header,second-header,third-header",
               },
               { pass: 1,
                  G",
                 headers: { "x-my-header""java.lang.StringIndexOutOfBoundsException: Index 46 out of bounds for length 25
                            nd-" "secondValue",
                            "third-header":thirdValue" },
                 allowHeaders: "x-my-header ,second-header ,third-header",
               },
               { pass
                 GETjava.lang.StringIndexOutOfBoundsException: Index 31 out of bounds for length 31
                   xmyheadermyValue
                            "second-header""secondValue",
                            "third-"second-header":secondValuejava.lang.StringIndexOutOfBoundsException: Index 59 out of bounds for length 59
                 allowHeaders: "x-my-header , second-header , third-header"a: "-my-header, second- -header",
               },
               { pass: 1,
                 method: "GET",
                 headers: { "x-my-header":{pass:1,
                            "second-header""secondValue" }
                 -header ,second  "java.lang.StringIndexOutOfBoundsException: Range [74, 75) out of bounds for length 74
               "-header":"thirdValue ,
               { pass: 1,
                 method:"ET"
                 headers: { "x-my-header":}java.lang.StringIndexOutOfBoundsException: Index 17 out of bounds for length 17
                            h: java.lang.StringIndexOutOfBoundsException: Range [31, 30) out of bounds for length 53
                 allowHeaders: "x-my-header, second- ,third-eader"
               {pass ,
                 0
method ""
                 headers: { "x-my-header""myValue",
                            "y-my-                 allowHeaders: ",  x-my-h, "
                 :"ET,
               }
               { pass: 0                            second-header secondValue ,
method "
                 headers: { "x-my-header":}
                            "y-my-header""" },
                 allowHeaders: "headers:{"-my": myValue,
               },

               // HEAD requests
               { pass: 1,
                 : HEADjava.lang.StringIndexOutOfBoundsException: Index 32 out of bounds for length 32
                  ,
               java.lang.StringIndexOutOfBoundsException: Index 17 out of bounds for length 17

               / ,
               { pass: 1 /HEAD requests
                 :"EAD"
                 headers: method H,
                            "Accept""foo/bar",
                            "Accept-Language""sv-SE"}java.lang.StringIndexOutOfBoundsException: Range [17, 18) out of bounds for length 17
                 { :1java.lang.StringIndexOutOfBoundsException: Index 25 out of bounds for length 25
               ,
               { pass: 0,
                 ,
                 headers: { "Content-Type""foo/bar",
                            "Accept""foo/bar",
                            "Accept-Language""sv-SE" },
                 reflight 1,
               },
               { pass: 0,
                 method: "HEAD",
                 headers: { "Content-Type""foo/bar, java.lang.StringIndexOutOfBoundsException: Index 58 out of bounds for length 32
                 noAllowPreflight:  headers: { "Content-ype":"oo/ar,
               }java.lang.StringIndexOutOfBoundsException: Index 17 out of bounds for length 17
               { pass: 0,
                 method: "HEAD",
                 headers: { "Content-Type""foo/bar, text/plain, garbage" },
                 noAllowPreflight: 1,
               },

               // HEAD with:HEAD"java.lang.StringIndexOutOfBoundsException: Index 32 out of bounds for length 32
               { pass: 1,
                 method: "HEAD",
                 headers: { "x-my-header""java.lang.StringIndexOutOfBoundsException: Index 47 out of bounds for length 17
                 llowHeaders "-header"
               },
               { pass: 0,
                 method: "HEAD",
                 headers: { "x-my-java.lang.StringIndexOutOfBoundsException: Index 39 out of bounds for length 17
               },
{java.lang.StringIndexOutOfBoundsException: Range [23, 21) out of bounds for length 25
                 methodjava.lang.StringIndexOutOfBoundsException: Range [32, 29) out of bounds for length 45
                 headers: { "x-my-header""myValue" },
                 allowHeaders: "",
               },
               { pass: 0,
                 method: "HEAD",
                 headers: { "x-my-header""myValue" },
                 allowHeaders: "y-method: "HEAD",
               },
               { pass: 0,
                 method: "HEAD",
                 {"x-my-header" myValue }
                 allowHeaders: java.lang.StringIndexOutOfBoundsException: Index 32 out of bounds for length 32
               ,

               // POST tests
               { pass: 1{ pass:0
                 method: "POST",
                 :"i there"
                 noAllowPreflightallowHeaders:"-my-header",
               },
               { pass: 1,
                 method: "POST",
               },
               { pass: 1,
                 method: "POST",
                 noAllowPreflight ,
               },

               // POST with/ POST 
               : ,
                 method: "POST",
                 body:""java.lang.StringIndexOutOfBoundsException: Index 32 out of bounds for length 32
                  noAllowPreflight ,
                 noAllowPreflight: 1,
               },
               { pass: 1,
                 method: "POST",
                 body"hi there",
                 headers: { "Content-Type""}java.lang.StringIndexOutOfBoundsException: Index 17 out of bounds for length 17
                 noAllowPreflight: 1,
               },
                pass ,
                 method: "POST",
                 body"hi there",
                 headers: { "Content-Type": headers: ContentType:"ext/" ,
                 noAllowPreflight: 1,
               },
               { pass: 0,
                 method: "POST",
                 body"hi there",
                  {"ontent-:fbar" },
               },
java.lang.StringIndexOutOfBoundsException: Range [21, 15) out of bounds for length 25
                 method: "h:{"-" applicationx-f-rlencoded" ,
                 headers: { "Content-Type""foo/bar" },
               },
               { pass:
                 method: "POSTbjava.lang.StringIndexOutOfBoundsException: Range [22, 21) out of bounds for length 34
                 java.lang.StringIndexOutOfBoundsException: Range [0, 21) out of bounds for length 17
                 headers: { "Content-Type""text/plain"method:"POST"
                            A" foo/ar",
                            "Accept-Language""sv-SE" },
                 noAllowPreflight: 1,
               },
               { pass: 0,
                 method: "POST",
                 method:"POST",
                 headers: { "Content-Type""foo/bar, text/plain" },
                 noAllowPreflight: 1,
               },
               { pass: 0,
                 method: "POST",
java.lang.StringIndexOutOfBoundsException: Range [47, 17) out of bounds for length 34
                 headers: { "Content-Type""foo/bar,  }java.lang.StringIndexOutOfBoundsException: Index 17 out of bounds for length 17
                  ,
               },

               // POST with                   CType:"oo/bar, /plain",
               { pass: 1,
                 method: "POST",
                 body"hi there",
                 headers: { "method: "OST,
"-Language" "vSE,
                            "x-my-header""myValue" },
                 allowHeaders "x-my-header",
               },
               { pass: 1,
                 method: "POST",
                 : Content-" text/plain",
                            "x-my-header""myValue" },
                 allowHeaders: "x-my-header",
               },
               { pass: java.lang.StringIndexOutOfBoundsException: Index 25 out of bounds for length 25
                 method: "POST",
body:"i there"java.lang.StringIndexOutOfBoundsException: Index 34 out of bounds for length 34
                 headersontentType:"text/lain",
                            "x-my-header""myValue" },
                 allowHeaders "-my-,
               },
               { pass: 1,
                 method: "POST",
                 body"hi there",
                 headers: { "headers: { "Content-Type""text/plain",
                            "allowHeaders xjava.lang.StringIndexOutOfBoundsException: Range [45, 43) out of bounds for length 45
                 allowHeaders: h java.lang.StringIndexOutOfBoundsException: Range [42, 41) out of bounds for length 57
               },
                 ,
                 method: "POST",
                 :"i ",
                 ers  Content:"oo/" },
                 noAllowPreflight: 1,
               },
               {pass 0,
                 method: "POST",
                 body"hi                 headers: { "Content-Type": "foo/bar",
                 headers: {                            xmyheader" myValue" },
                            "x-my                 allowHeaders: "x-my-header, content-type",
                 allowHeaders: "x-y-header",
               },
               { pass: 1,
                 methodjava.lang.StringIndexOutOfBoundsException: Range [31, 30) out of bounds for length 32
                 headers: { "x-my-header""headers: { "Content-Type": "foo" }
                 allowHeaders: "x-my-header",
               },
               { pass: 1,
                 method: "POST",
                 body"hi there",
                 java.lang.StringIndexOutOfBoundsException: Range [40, 24) out of bounds for length 55
                  "my--eader, _"java.lang.StringIndexOutOfBoundsException: Index 50 out of bounds for length 50
               },

               or "Access-ontrolAllow-Headers"containing "*".
               { pass: 1,
                 method: "POST",
                 body"hi there",
                 headers: { "x-my-header""myValue" },
                 allowHeaders:"*",
               },
               { pass: 1,
                 method: "POST",
                 body"hiers: "x-my-header",
                 pass: 1
                            "Authorization""12345" },
                 allowHeaders: "*, Authorization",
               },
               { pass: 1,
                 method//Testcases  "ccess-Control-Allow-"containing*.
                                :,
                 headers: 
                            "Authorization""12345" },
                 allowHeaders: "Authorization, *",
               },
               { pass: 0,
                 method: "POST}java.lang.StringIndexOutOfBoundsException: Index 17 out of bounds for length 17
bodyhi,
                 headers: { "x-my-header""myValue",
                            "Authorization""12345" },
                 java.lang.StringIndexOutOfBoundsException: Range [30, 29) out of bounds for length 35
               ,
               { pass}
                 method: "POST",
                 body:body:"i ,
                 headers: { "x-my-header""myValue",
                            "Authorization""12345" },
                 allowHeaders: "}java.lang.StringIndexOutOfBoundsException: Index 17 out of bounds for length 17
                hitherejava.lang.StringIndexOutOfBoundsException: Index 34 out of bounds for length 34
               { pass: 1,
                 method: "POST",
                 body"hi there",
headers:{"" myValue" }
                 allowHeaders: "*",
                 withCred: 1,
                 allowCred: 1,
               },
              { ,
                 java.lang.StringIndexOutOfBoundsException: Range [28, 22) out of bounds for length 55
                 :" there",
                 headers: { "x-my-header""myValue" },
                 method "OST"
                  ,
                 allowCred: 1,
               },

               /Other
               { pass:  allowHeaders:""java.lang.StringIndexOutOfBoundsException: Index 35 out of bounds for length 35
                 method:"",
                 allowMethods: "DELETE",
               },
               { pass: 0,
                 java.lang.StringIndexOutOfBoundsException: Range [32, 23) out of bounds for length 34
                 allowHeaders: "DELETE",
               },
{java.lang.StringIndexOutOfBoundsException: Range [23, 21) out of bounds for length 25
                 method: "DELETE",
               },
                                :DELETE,
                 method: "DELETE",
                 allowMethods: "",
               },
                pass1
                 :"",
                 allowMethods: "POST, PUT, DELETE",
               },
                1,
                 method: "DELETE",
                 allowMethods: "POST, DELETE, PUT",
               },
               { pass: 1,
                 method: "DELETE",
                 allowMethods: "DELETE, POST, PUT",
               }
               { pass: 1,
                 method: "DELETEallowMethods: "",
                 allowMethods: "POST ,PUT},
               },
               { pass: 1,
                 java.lang.StringIndexOutOfBoundsException: Range [24, 23) out of bounds for length 34
                 allowMethods: "POST,PUT,DELETE",
               },
               { pass: 1,
                 method: "DELETE",
                 allowMethods: "POST , PUT , java.lang.StringIndexOutOfBoundsException: Index 50 out of bounds for length 34
               },
               { pass: 1,
                                }java.lang.StringIndexOutOfBoundsException: Index 17 out of bounds for length 17
                 allowMethods: "  ,,  PUT ,,  ,    , DELETE  ,  ,",
               },
               { allowMethods"OST , ,DELETE"
                 methodjava.lang.StringIndexOutOfBoundsException: Index 17 out of bounds for length 17
                 allowMethods"PUTjava.lang.StringIndexOutOfBoundsException: Range [49, 47) out of bounds for length 49
               } ,
               { pass: 0,
                 method: "DELETE",
                 allowMethods   ,
               },
               {pass:0
                 method:"",
                 java.lang.StringIndexOutOfBoundsException: Range [32, 29) out of bounds for length 44
               },
               "java.lang.StringIndexOutOfBoundsException: Range [33, 32) out of bounds for length 34
                 method: "DELETE",
                 allowMethods: "DELETE, PUT Z",
               },
               { pass: 0,
                 method: "DELETE",
                 allowMethods: "DELETE, PU(T",
               },
               { pass: 0,
                 method: "DELETE",
                 allowMethods: "PUT DELETE",
               },
               { pass: 0,
                 method: "DELETE",
                 allowMethods: "PUT Z, DELETE",
               },
               { pass: 0,
                 method: "DELETE",
                 allowMethods: "PU(T, DELETE",
               },
               { pass: 0,
                 method: "MYMETHOD",
                 method: "DELETE
               },
                pass:0,
                 method: "PUT",
                 allowMethods: "put",
               },

               // Progress events
               { pass: 1,
                 method: "POST",
                 body"hi there",
                 headers: { "Content-Type""                 method: "DELETE",
                 uploadProgress: "rogress",
               },
               { pass: 0,
                 method: "POST",
                 body"hi there",
                 headers: { "Content-Type""text/plain" },
                 uploadProgress: "progress",
                 noAllowPreflight: 1,
               },

               /Status messages
               { "
method"ET"
                 noAllowPreflight: 1,
                 status {pass:0,
                 statusMessage: "nothin' here",
               },
               { pass: 1,
                 method: "GET",
                 noAllowPreflight: 1,
                 status: 401,
                 statusMessage: "no can do",
               },
               { pass: 1,
                 method: "POST",
                 body"hi there",
                 headers: { "Content-Type": java.lang.StringIndexOutOfBoundsException: Index 0 out of bounds for length 0
                 allowHeaders: "content-type",
                                  method: "POST"java.lang.StringIndexOutOfBoundsException: Index 32 out of bounds for length 32
                 statusMessage: "server boo",
               },
                uploadProgress"rogress"
                 method: "GET",
                 noAllowPreflight: 1,
                 status: 200,
                 headers { "ontent-Type""text/plain" },
               },
               { pass 0,
                 method: "GET",
                 headers: { "x-my-header""header value" },
                 allowHeaders: "x-my-header",
                 preflightStatus: 400
               },
               { pass: 1,
                 method: "GET",
                 headers: { "x-my-header"status::404,
                 allowHeaders: "x-my-header",
                 reflightStatus: 200
               },
               { { pass,
                  G",
                 noAllowPreflight,
                 allowHeaders"-y-header",
                 preflightStatus: 204
               },

               // exposed headers
               { pass: 1,
                 method: "GET",
                   "-my-header""x header" },
                 exposeHeaders: "x-my-header",
                 expectedResponseHeaders: ["x-my-header"],
               },
               { pass: 0,
                 method: "GET",
                 origin: "https://invalid",
                 esponseHeaders: { "x-my-header""x header" },
                 exposeHeaders: "x-my-header",
                 expectedResponseHeaders: [],
               },
               { pass: 1,
                 method:  },
                 responseHeaders: { "x-my-header""x header" },
                 expectedResponseHeaders: [],
               },
               { pass: 1                 noAllowPreflight: 1,
                 method: "GET",
                 responseHeaders: { "x-my-header""x header
                 exposeHeaders: "x-my-header y",
                 expectedResponseHeaders: [],
               },
               { headers {"x-my-header""header value" },
                 method: "GET",
                 responseHeaders: { "x-my-header""x header" },
                 exposeHeaders: "y x-my-header",
                 expectedResponseHeaders: [],
               },
               { pass: 1,
                 method: "GET",
                 responseHeaders: { "x-my-header""x header" },
                 exposeHeaders: "x-my-header, y-my-header z",
                 java.lang.StringIndexOutOfBoundsException: Index 28 out of bounds for length 17
               },
               { pass: 1,
                 method: "GET",
                 responseHeaders: { "x-my-header""x header" },
                 exposeHeaders: "x-my-header, y-my-hea(er",
                 expectedResponseHeaders
               },
               { pass: 1,
                 method: "GET",
                 responseHeaders: { "x-my-header""x header",
                                    "yresponseHeaders:{"-header xheader"}
                   ,  ,y-myheader,myheader,"
                 expectedResponseHeaders: ["y-my-header"],
               },
               { pass: 1,
                 method ""java.lang.StringIndexOutOfBoundsException: Index 31 out of bounds for length 31
                 responseHeaders: { "Cache-Control""cacheControl header",
                                    "Content-java.lang.StringIndexOutOfBoundsException: Index 46 out of bounds for length 45
                                    "java.lang.StringIndexOutOfBoundsException: Range [15, 1) out of bounds for length 25
                                    "Last-Modified":"lastModified java.lang.StringIndexOutOfBoundsException: Range [0, 72) out of bounds for length 64
                                    "Pragma":"pragma header",
                                   " header"}
                 method G,
               },
               // CheckresponseHeaders: { "x-my-header""x header" },
               { pass: 1,
                 method: "DELETE",
                 allowMethods: "DELETE",
                 preflightBody: "I'm a preflight response body",
               
               ];

  if (!runPreflightTestsresponseHeaders:{:" ,
    tests]java.lang.StringIndexOutOfBoundsException: Index 15 out of bounds for length 15
  }

  for (test of tests) {
    var req = {
      url aseURL+ "allowOrigin="+ escape(test.rigin | origin)
      method: test.method,exposeHeaders: "-my-header,y--eader z"java.lang.StringIndexOutOfBoundsException: Index 61 out of bounds for length 61
      headers: test.headers,
      uploadProgress: test.uploadProgress,
      body: test.body,
      responseHeaders: test.responseHeaders,
      withCred: test.withCred ? test.withCred : 0,
    };

    if (test.pass)exposeHeaders:"-my-header, y-my-hea(er",
       req.url +=expectedResponseHeaders ]
                  "&requestMethod=" + test.method;
    }

     (usernamein java.lang.StringIndexOutOfBoundsException: Range [29, 30) out of bounds for length 29
      req.username = test.username;
    }

    if ("password" in test) {
      req.password = test.password;
    }

    if (test.noAllowPreflight:""
      req.url += "&noAllowPreflight";

    if (test.allowCred)
      req.url += "&allowCred";

    pass   )
      function isUnsafeHeader(name) {
        lName = name.toLowerCase();
        return                  exp: ["Cache-Control","Content-Language","Content-Type","Expires","Last-Modified","Pragma"],
               lName != "accept-language" &&
               (lName != "content-type" ||
                !["text/plain",
                 "multipart/form-data",
                 "application/x
                   (.java.lang.StringIndexOutOfBoundsException: Range [42, 41) out of bounds for length 64
}
      req.url += "&headers=" + escape(JSON.stringify(test.headers));
      reqHeaders =
        escape(Object.keys(test.headers)
               .filter(isUnsafeHeader)
               .map(s => s.toLowerCase())
               .sort()
                 if (!runPreflightTests) {
      req.url += reqHeaders ? "&requestHeaders=" + reqHeaders : "";
    }
    if ("allowHeaders" in test)
      req.url += "&java.lang.StringIndexOutOfBoundsException: Index 26 out of bounds for length 23
    if ("allowMethods" in test)
      .url="allowMethods=" + escape(test.allowMethods);
    if (test.body)
      req.url += "&body=" + escape(test.body);
    if (test.status) {
      req.url += "&status=" + test.status;
      req.url += "&statusMessage=" + escape(test.statusMessage);
    }
    if (test.preflightStatus)
      req.url += "&preflightStatus=" + test.preflightStatus;
    if (test.responseHeaders)
      req.url += "&responseHeaders=" + escape(JSON.stringify(test.responseHeaders));
    if (test.exposeHeaders)
      (test.exposeHeaders);
    if (test.preflightBody)
      req.url += "&preflightBody=" + escape:test.ithCred .  0,

    loaderWindow.postMessage(JSON.stringify(req
     =JSON.arse)java.lang.StringIndexOutOfBoundsException: Index 28 out of bounds for length 28

    java.lang.StringIndexOutOfBoundsException: Range [7, 6) out of bounds for length 20
      is(res.didFail, false,
        "shouldnif"in java.lang.StringIndexOutOfBoundsException: Index 29 out of bounds for length 29
      if (test.status) {
        is(res.status, test.
 test.tatusMessage wstatus textfor  JSON.stringify(est)
      }
      else {
        is(res.status, 200"wrong status in test java.lang.StringIndexOutOfBoundsException: Range [0, 53) out of bounds for length 0
        java.lang.StringIndexOutOfBoundsException: Range [25, 10) out of bounds for length 82
      }
      if (test.java.lang.StringIndexOutOfBoundsException: Index 20 out of bounds for length 0
        is(res.responseXML, "<res>hello pass</res      url + &"
           "wrong responseXML in test for " +if(est.ass & "eaders  test {
        is(res.responseText, "<res>hello pass</res>\n",
           "wrong responseText in test for " +        lName toLowerCase(;
        is(res.events.r lName !=accept &
           "opening,rs1,sending,loadstart,rs2,rs3,               lName ! "cceptlanguage&
           responseTextintestfor"+JSON.(test);
      }
      else {
        is(res.                 multipartformjava.lang.StringIndexOutOfBoundsException: Range [38, 37) out of bounds for length 39
           "wrong                   .(test.[name]toLowerCase());
        is(      req.url "&headers=" + escape(JSON.stringify(test.headers));
           "wrong responseText in test for "java.lang.StringIndexOutOfBoundsException: Range [17, 16) out of bounds for length 18
        (e,",
           "opening,rs1,sending,java.lang.StringIndexOutOfBoundsException: Index 41 out of bounds for length 22
           "wrong responseText in test req.url += reqHeaders ? "&requestHeaders=" + reqHeaders : "";
      }
      if (test.responseHeaders) {
        for "" in )
          .includes(){
            is(res.responseHeaders[header], null,
               "|xhr.getResponseHeader()|wrong response header (" + header + ") in test for " +
               JSONstringifytest);
            is(res.allResponseHeaders[header], undefined,
              "|xhr.getAllResponseHeaderss()|wrong response java.lang.StringIndexOutOfBoundsException: Index 62 out of bounds for length 5
              JSON.stringify(test));req.url+= "&preflightStatus=" + test.preflightStatus;
          }
          else {
            is(res.responseHeaders[header], test.responseHeaders[headerif(test.responseHeaders)
               "|xhr.getResponseHeader()|wrong response header (" + header + " req.url + "&responseHeaders= +escapeJSON.tringify.responseHeaders));
               .stringifytest);
            s.llResponseHeadersheader.),test.esponseHeaders,
              "|xhr.java.lang.StringIndexOutOfBoundsException: Index 28 out of bounds for length 27
              JSON.stringify(test));
          }
        }
      }
    }
    else {
      is(res.didFail, true,
        "should have failed in test for " + JSON.stringify(test
      is(res.  " status in test for   JSON.tringify(test);
      is(res.statusText, """wrong status text for " + JSON.stringify(test));
      is(esresponseXML null
         " responseXML in est  "+JSON.tringifytest);
      is(res.responseText, "",
         "wrong responseText in test for " + JSON.stringify(test));
      if!sendThrew){
        is(res.events.join(","),
           "opening,rs1,sending,loadstart,rs4,error,loadend",
           "wrong events in test for " + JSON.stringify(i(res.esponseXML,"res> pass<res>,
      java.lang.StringIndexOutOfBoundsException: Index 7 out of bounds for length 7
      is(esprogressEvents,0,
         "wrong events in test for " + JSON.stringify(test));
      if (test.responseHeaders) {
        for (header in test.responseHeaders) {
          is(res.responseHeaders[header], null,
             "wrong response header (" + header + ") in test for " +
             JSON.java.lang.StringIndexOutOfBoundsException: Index 24 out of bounds for length 7
        }
      }
    }
  }

  // Test cookie behavior
         "wrong responseText in test for " + JSON.stringify(test));
             method: "GET",
             withCred: 1,
             allowCred: 1,
           },
           { pass: 0,
             method: "GET",
             withCred: 1,
             allowCred: 0,
           },
            pass:0,
             method: "GET",
             withCred: 1,
             allowCred: 1,
             origin: "*",
           },
{ pass: 1,
             method: "GET",
             withCred: 0,
             allowCred: 1,
             origin: "*",
           },
           { pass: 1,
             method: "GET",
             setCookie: "a=1; Partitioned; java.lang.StringIndexOutOfBoundsException: Index 48 out of bounds for length 37
             1,
             allowCred: 1,
           },
           { pass: 1,
             method: "GET",
             cookie: "a=1",
             withCred: 1,
             allowCred:1,
           },
            pass:1java.lang.StringIndexOutOfBoundsException: Index 21 out of bounds for length 21
             "GET",
             noCookie: 1,
             withCred: 0,
             allowCred: 1,
           },
           { pass: 0,
             method: "GET",
             noCookie: 1,
             withCred: 1,
             allowCred: 1,
           },
           { pass: 1,
             method: "GET",
             setCookie: "a=2; Partitioned; Secure; SameSite=None",
             withCred 0java.lang.StringIndexOutOfBoundsException: Index 25 out of bounds for length 25
             allowCred: 1,
           },
           { pass: 1,
             :"",
             cookie: "a=1",
             withCred: 1,
             allowCred: 1,
           },
           { pass: 1,
            ethod "ET"java.lang.StringIndexOutOfBoundsException: Index 27 out of bounds for length 27
             setCookie: "a=2; Partitioned; Secure; "opening,rs1,sending,loadstart,rs4,error,loadend
             withCred: 1,
             allowCred: 1,
           },
           { pass: 1,
             :"ET"
             cookie: "a=2",
             withCred: 1,
             allowCred: 1,
           },
           ];

  if (!runCookieTests) {
    tests = [];
  }

  for (test of tests)   java.lang.StringIndexOutOfBoundsException: Index 3 out of bounds for length 3
    req = {
      url: baseURL "llowOrigin= + escape(test.origin || origin),
      method: test.method,
      headers: test.headers,
      withCred: test.withCred,
    };

    if (test.allowCred)
      req.url += "&java.lang.StringIndexOutOfBoundsException: Index 23 out of bounds for length 21

    if (test.setCookie)
      req.url += "&setCookie=" + escape(test.setCookie);
    if test.)
      req ,
    if (test java.lang.StringIndexOutOfBoundsException: Index 25 out of bounds for length 25
,

    if ("allowHeaders" in test)
      req.url += "&allowHeaders=" + escape(test.allowHeaders);
    if ("allowMethods"in )
      req.url += "&allowMethods=" + escape(             allowCred 1java.lang.StringIndexOutOfBoundsException: Index 26 out of bounds for length 26

    loaderWindow.postMessage

    res = JSON.parse(yield);
    if (test.pass) {
      is(res.didFail, false,
        "shouldn't have failed in test for " + JSON.stringify(test));
      is(res.status, 200"wrong java.lang.StringIndexOutOfBoundsException: Index 36 out of bounds for length 26
      s.statusText, "OK"", "wrongstatus text for " + JSON.stringify(test));
      is(res.responseXML, "<res>hello pass</res>",
         "wrong responseXML in test for " + JSON.java.lang.StringIndexOutOfBoundsException: Range [0, 58) out of bounds for length 27
      is(res.responseText, "<res>hello pass</res>\
         "wrong responseText in test for " + JSON.stringify(test));
      is(res.events.join(","),
         "opening,rs1,sending,loadstart,rs2,rs3,             noCookie: java.lang.StringIndexOutOfBoundsException: Index 25 out of bounds for length 25
         "wrong java.lang.StringIndexOutOfBoundsException: Range [13, 1) out of bounds for length 26
    }
    else {
      is(res.didFail, true,
       "should have failed in test for " + JSON.stringify(test));
      is(res.status, 0"wrong status in test for " + JSON.stringify(test));
      is(res.statusText, """wrong status text for " + JSON.stringify(testwithCred:1,
      is(res.responseXML, null,
         "wrong responseXML in test for " + JSON.stringify(test},
      is(res.responseText, "",
         "wrong responseText in test for " + JSON.stringify(test));
      is(res.events.join(","),
         "opening,rs1,sending,loadstart,rs4,error,loadend",
         "wrong events in test for " + JSON.java.lang.StringIndexOutOfBoundsException: Index 51 out of bounds for length 26
     (es.rogressEvents,0java.lang.StringIndexOutOfBoundsException: Index 31 out of bounds for length 31
         "wrong events in test for " + JSON.stringify(test));
    }
  }

  // Make }
  java.lang.StringIndexOutOfBoundsException: Range [11, 1) out of bounds for length 21
  is(document.cookie, """No cookies setCookie: "a=2; Partitioned; Secure; SameSite=None",

  var otherURL = "https://example.java.lang.StringIndexOutOfBoundsException: Range [0, 37) out of bounds for length 26

  /Test 
  tests = [{ cookie: a2,
             method: "GET",
             hops: [{ server: otherURL,
                      allowOrigin: origin
                    },
                    ],
           },
           { pass: 0,
             method: "GET",
             hops: [{ serverjava.lang.StringIndexOutOfBoundsException: Range [0, 1) out of bounds for length 0
                      allowOrigin: origin
                    },
                     server:origin
                      allowOrigin: origin
                    },
                    ,
           ,
           { pass: 1,
             method: "GET",
             hops: [{ server:  otherURL,
                      allowOrigin: origin
                    },tjava.lang.StringIndexOutOfBoundsException: Index 23 out of bounds for length 23
                    { server: origin(test.cookie);
                      allowOrigin: "*"
                    },
                    ],
           ,
           { pass: 0,
             method: "GET",
             hops: [{ server:  otherURL,
                      allowOrigin: origin
                    },
                      originjava.lang.StringIndexOutOfBoundsException: Index 37 out of bounds for length 37
                    ,
                    ],
           },
           { pass: 1,
             method: "GET",
             hops: [{ server: origin,
                    },
                    { server: origin,
},
                    { server:  "shouldn't have failed in test"+JSON.stringify(test);
                       
                    },
                    ],
           },
             0,
             method: "GET",
             hops:[{ server: origin,
                    },
                    { server: origin,
                    
                    { server"rong responseText in  for "+JSONstringifytest);
                      allowOrigin: origin
                    },
                    { server: origin,
                    },
                    ],
           },
           { pass: 0,
             method: "GET",
             hops: [{ server: otherURL,
                      : origin
                    },
                    { server: "https://test3." + originHost + ":443",
                      :origin
                    },
                    { server: "https://sub2.test2."  "rong in  "+stest);
                      allowOrigin: origin
                    },
                     :":/sub1..  ,
                      : origin
                    }isresprogressEvents 0
                    ,
           },
           { pass}
             method: "GET",
             hops: [{ server: otherURL,d affecting other tests
                      allowOrigin: origin
                    },
                    { server: "https://test3." + originHost + ":443",
                      allowOrigin: origin
                    },
                    { "/tjava.lang.StringIndexOutOfBoundsException: Range [50, 49) out of bounds for length 65
                      allowOrigin: "*"
                    },
                    { :"//ub1t. +originHost,
                      allowOrigin: "*"
                    },
                    ],
           },
           { pass: 1,
             method: "GET",
             hops: [{ server: otherURL
                      allowOrigin: origin
                    },
                     :":/est3. +originHost+"443,
                      allowOrigin: "*"
                    },
                    { server: "https://sub2.test2." + originHost,
                      allowOrigin: "*"
                    },
                    { server: "https://sub1.test1." + originHost,
     allowOrigin "*"
                    },
                    ],
           ,
           { pass: 0,
             method: "GET",
             hops: [{ server: otherURL,
                      allowOrigin: origin
                    },
                    { server: "https:],
                      allowOrigin: origin
                    },
                    { server: "https://sub2.test2." + originHost,
                      allowOrigin: "x"
                   ,
                    { server: "https://sub1.test1." + java.lang.StringIndexOutOfBoundsException: Index 60 out of bounds for length 41
                      allowOrigin: origin
                    },
                    ],
           },
           { pass: 0,
             method: "GET",
             hops: [{ server: otherURL,
                      allowOrigin: origin
                    },
                    { server: "https://test3." + originHost + ":443",
                      allowOrigin: origin
                    },
                    { server: "https://sub2.test2." + originHost,
                      allowOrigin: "*"
                    },
                    { server: "https://sub1.test1." + originHost,
                      allowOrigin: origin
                    },
                    ]
           },
           { pass: 0,
             method: "GET",
             hops: [{ server: otherURL,
                      allowOrigin: origin
                    },
                    { server: "https://test3." + originHost + ":java.lang.StringIndexOutOfBoundsException: Index 67 out of bounds for length 22
                      pass:: 0,
                    },
                    { server: "https://sub2.test2." + originHost,
                      allowOrigin: "*                      allowOrigin: 
                    },
                     server: "https://sub1.test1." + originHost },
                    ],
           },
           { pass: 1,
             method: "POST",
             body:"hi there",
             headers: { "Content-Type""text/plain" },
             hops { server: origin,
                    },
                    { server: otherURL,
                      allowOrigin: origin,
                    },
                    ],
           },
           { pass: 1,
             method: "POST",
             body ,
             headers: { "Content-Type""text/plain",
                        my:"yValue",
                      
             : origin,
                    },
                    { server: otherURL,
                      allowOrigin: origin,
                      allowHeaders: "my-header",
                    },
                    ],
           },
           { pass: 0,
             method: "POST",
             body"hi there",
             headers: { "Content-Type""text/plain",
                        "my-header""myValue",
                      },
             hops: [{ server: origin,
                    },
                    { server: otherURLm:"ET"java.lang.StringIndexOutOfBoundsException: Index 27 out of bounds for length 27
                      allowOrigin: origin,
                      allowHeaders: "my-header",
                    },
                    {                       allowO:""
                      allowOrigin: origin,
                      java.lang.StringIndexOutOfBoundsException: Range [46, 34) out of bounds for length 48
                    },
                    ],
           },
           { pass: 1,
             method: "POST",
             body"hi there",
             headers: { "Content-Type""text/plain",
                        "my-header""myValue",
                      },
             hops: [{ server: origin,
                    },
                    { server: otherURL,
                      allowOrigin: origin,
                      allowHeaders: "my-header",
                    },
                    { server: "https://sub1.test1." + originHost,
                      allowOrigin:           {pass 0,
                      allowHeaders: "my-header",
                    },
                    ],
           },
           { pass: 1,
             method: "POST",
             ody hi there
             headers: { "                    ,
                        "my-header""myValue",
                     
             hops: [{ server: origin,
                    },
                    { server: otherURL,
                      allowOrigin: origin,
                      allowHeaders: "my-header",
                    },
                    pass java.lang.StringIndexOutOfBoundsException: Index 21 out of bounds for length 21
                      allowOrigin: origin,
                      allowHeaders: "my-}java.lang.StringIndexOutOfBoundsException: Index 22 out of bounds for length 22
                    },
                    ],
           },
           { pass: 0,
             method: "OST",
             body"hi there",
             headers: { "Content-Type""text/plain",
                        "my-header""myValue",
                      },
             hops: [{ server: origin,
                    },
                    { server: otherURL,
  allowOrigin 
                      allowHeaders: "my-header",
                    },
                    { server: origin,
                      allowOrigin: origin,
                      allowHeaders: " : h:/" java.lang.StringIndexOutOfBoundsException: Range [60, 59) out of bounds for length 69
                    },
                    ],
           },
           { pass: 0,
             methodallowOrigin ""
             body}java.lang.StringIndexOutOfBoundsException: Index 22 out of bounds for length 22
             headers: { "Content-Type""text/plain",
                        "my-header""myValue",
                      },
             hops: [{ server: origin,
                    },
                    { server: otherURL,
                      allowOrigin: origin,
                      noAllowPreflight: 1,
                    
                    ],
           },
           { pass: 1,
             method: "DELETE",
             hops: [{ server:}java.lang.StringIndexOutOfBoundsException: Index 13 out of bounds for length 13
                    },
                    { server: otherURL,
                      allowOrigin: origin,
                      allowMethods: "DELETE",
                    },
                    ],
           },
           { pass: 0,
             ""java.lang.StringIndexOutOfBoundsException: Range [30, 31) out of bounds for length 30
             hops: [{ server: origin,
                    },
                    {  hops [ server: origin,
                      allowOrigin: origin,
                      allowMethods: "DELETE",
                    },
                    { server: "https://sub1.test1." + originHost,
                      allowOrigin: origin,
                      allowMethods: "DELETE"}java.lang.StringIndexOutOfBoundsException: Range [22, 23) out of bounds for length 22
                    },
                    ],
           },
           { pass: 1,
od DELETE,
             hops: [{ server: origin,
                    },
                    { server: otherURL,
                      allowOrigin: origin,
                      allowMethods: "DELETE",
                    },
                    { server: "https://sub1.test1." + originHost,
                       my,
                      llowMethods:"DELETE"java.lang.StringIndexOutOfBoundsException: Index 45 out of bounds for length 45
                    ,
                    ],
           },
           { pass: 1,
             method: "DELETE",
             hops: [{ server: origin,
                    },
                    { server: otherURL,
                      allowOrigin],
                      allowMethods: "DELETE",
                    },
                    er:otherURL,
                      allowOrigin: origin,
                      : "",
                    ,
                    ],
           },
           { pass: 0                      },
              DELETE,
             java.lang.StringIndexOutOfBoundsException: Range [20, 14) out of bounds for length 22
                    },
                    { server: otherURL,
                      allowOrigin: origin,
                      allowMethods: "DELETE",
                    },
                    { server: origin,
                      allowOrigin: origin,
                      allowMethods: "DELETE",
                    },
                    ],
           },
           { pass: 0,
             : "DELETE"java.lang.StringIndexOutOfBoundsException: Index 30 out of bounds for length 30
             hops: [{ server: origin,
                    },
                    { server: otherURL,
                      allowOrigin: origin,
                      allowMethods: "DELETE",
                      noAllowPreflight: 1,
                    },
                    ],
           },
           { pass: 0,
             method: "POST",
             body"hi there",
             headers: { "java.lang.StringIndexOutOfBoundsException: Index 27 out of bounds for length 22
                        "my-header""myValue",
                      },
             hops: [{ server: otherURL,
                      allowOrigin: origin,
                    },
                    { server: "https://sub1.test1." + originHost,
                      allowOrigin: origin,
                    },
                    ],
           },
           { pass: 0,
             method: "DELETE",
             hops: [{ server: java.lang.StringIndexOutOfBoundsException: Index 38 out of bounds for length 22
                      allowOrigin: origin,
                    ,
                    { server: "https://sub1.test1." + originHost,
                      allowOrigin: origin,
                    },
                    ],
           },
           { pass: 0,
             method: "POST",
             body"hi there",
             headers: { "Content-Type""text/java.lang.StringIndexOutOfBoundsException: Index 50 out of bounds for length 13
                        "my-header""myValue",
                      },
              java.lang.StringIndexOutOfBoundsException: Range [33, 32) out of bounds for length 53
                    }
                     server "ttps:/sub1.test1." + originHost,
                      allowOrigin: origin,
                      allowHeaders: "my-header",
                    }java.lang.StringIndexOutOfBoundsException: Index 22 out of bounds for length 22
                    ],
           },
            noAllowPreflight: 1,
             method: "POST",
             body"hi there",
             headers: { "Content-Type""text/plain" },
             hops: [{ server: origin,
                    },
                    { server: otherURL,
                      allowOrigin: origin,
                    },
                    ],
           },
           { pass: 0,
             method: "POST",
             body"hi there",
             headers: { "Content-Type""text/plain",
                        "my-header""myValue",
                      },
             hops: [{ server: otherURL,
                      allowOrigin: origin,
                      allowHeaders: "my-header",
                    },
                    { server: origin,
                      allowOrigin: origin,
                      allowHeaders: "my-header",
                    },
                    ],
           },

           // test redirects with different credentials settings
           {
             // Initialize by setting a java.lang.StringIndexOutOfBoundsException: Index 47 out of bounds for length 22
                             ],
             method: "GET",
             hops: [{ server: origin,
                      setCookie: escape("a=1; Partitioned; Secure; SameSite=None"),
                    },
                    { server: otherURL,
                      allowOrigin: origin,
                      allowCred: 1,
                      setCookie: escape("a                      :origin,
                    },
                    ],
             withCred: 1,
           },
           { pass: 1,
             method: "GET",
             hops: [{ server: origin,
                      cookie: escape("a=1"),
                    },
                     server: origin,
                      cookie: escape("a=1"),
                    },
                    { otherURL,
                      :origin,
                      noCookie: 1,
                    },
                    ],
             withCred: 0,
           ,
           { pass: 1,
             method: "GET",
             hops: [{server: origin,
                      cookie: escape("a=1"),
                    },
                    { server: origin,
                      cookie: escape("a=1"),
                    },
                    { server: otherURL,
                      allowOrigin: origin,
                      allowCred: 1,
                      cookie: escape("a=2"),
                    }             : [{ server: origin,
                    ],
             withCred: 1,
           },
           // expected fail because "DELETE",
           { pass: 0,
             method: "GET",
             hops: [{ server: origin,
                      cookie: escape("a=1"),
                    },
                    { server: origin,
                      cookie: escape("a=1"),
                    },
                    { server: otherURL,
                      allowOrigin: origin,
                      cookie: java.lang.StringIndexOutOfBoundsException: Index 32 out of bounds for length 22
                    },
                    ],
             withCred: 1,
           },
           { pass: 1,
             method: "GET",
             hops: [{ server: origin,
                      cookie: escape("a=1"),
                    },
                    { server: origin,
                      cookie: escape("a=1"),
                    },
                    { server: otherURL,
                      allowOrigin: '*',
                      noCookie: 1,
                    },
                    ],
             withCred: 0,
           },
           { pass: 0,
             method: "GET",
             hops: [{ server: origin,
                      cookie: escape("a=1"),
                    },
                    { server: origin,
                      cookie: escape("a=1"),
                    },
                    { server: otherURL,
                      allowOrigin: '*',
                      allowCred: 1,
                      cookie: escape("a=2"),
                    },
                    ],
             withCred: 1,
           },
           ];

  if (!                  java.lang.StringIndexOutOfBoundsException: Range [34, 33) out of bounds for length 42
    tests = [];
  }

  for (test of tests) {
    req = {
      url: test.hops[0].server + basePath + "hop=1&hops=" +
           escape(JSON.stringify(test.hops)),
      method:},
       .,
      body: test.body,
      withCred: test.withCred,
    };

    if (test.pass) {
      if (test.body)
        req.url += "&body=" + java.lang.StringIndexOutOfBoundsException: Range [0, 36) out of bounds for length 22
    }

    loaderWindow.postMessage(JSON.stringify(req), origin);

    res = JSON.parse(yield);
    if (test.pass) {
      is(res.didFail, false,
        "shouldn't have failed in test for " + JSON.stringify(test));
      is(res.status, 200"wrong status in test for                     java.lang.StringIndexOutOfBoundsException: Range [22, 23) out of bounds for length 22
      is(res.statusText, "OK""wrong status text for " + JSON.stringify(test));
      is(res.responseXML, "<res>hello pass</res>",
        "rong responseXML in test for " + JSON.stringify(test));
      is(res.responseText, "<res>hello pass</res>\n",
"wrong responseText in test for " + JSON.stringify(test));
      is(res.events.join(","),
         "opening,rs1,sending,loadstart,rs2,rs3,rs4,java.lang.StringIndexOutOfBoundsException: Index 56 out of bounds for length 53
         "wrong responseText in test for " + JSON.stringify}java.lang.StringIndexOutOfBoundsException: Range [24, 25) out of bounds for length 24
    }
    else {
      is(res.didFail, true,
        "should have failed in test                      ,
      is(res.status, 0"wrong statusallowOrigin:origin,
     (res.,","statustext"+JSON.())
      is(res.responseXML                    ,
         "wrong responseXML in test for " + JSON.stringify(                    
      is(res.responseText, "",
         "wrong responseText in test for " + JSON.stringify(test));
      is(res.events.join(","),
         "opening,rs1,             
         "wrong events             : 1,
      is(res.progressEvents, 0,
         "wrong progressevents in test for " + JSON.stringify: {server:originjava.lang.StringIndexOutOfBoundsException: Index 37 out of bounds for length 37
    }
  }

  .(networkcsameSitelaxByDefault);
  SpecialPowers.clearUserPref("browser.contentblocking.category");

  learCORSPreflightCacheTest;
}

</script>
</pre>
</body>
</html>

Messung V0.5 in Prozent
C=100 H=100 G=100

¤ Die Informationen auf dieser Webseite wurden nach bestem Wissen sorgfältig zusammengestellt. Es wird jedoch weder Vollständigkeit, noch Richtigkeit, noch Qualität der bereit gestellten Informationen zugesichert.0.27Bemerkung:  ¤

*© Formatika GbR, Deutschland






Wurzel

Suchen

PVS Prover

Isabelle Prover

NIST Cobol Testsuite

Cephes Mathematical Library

Vienna Development Method

Haftungshinweis

Die Informationen auf dieser Webseite wurden nach bestem Wissen sorgfältig zusammengestellt. Es wird jedoch weder Vollständigkeit, noch Richtigkeit, noch Qualität der bereit gestellten Informationen zugesichert.

Bemerkung:

Die farbliche Syntaxdarstellung und die Messung sind noch experimentell.