Eine aufbereitete Darstellung der Quelle

 
     
 
 
Anforderungen  |   Konzepte  |   Entwurf  |   Entwicklung  |   Qualitätssicherung  |   Lebenszyklus  |   Steuerung
 
 
 
 

Benutzer

Quelle  preflight-failure.htm   Sprache: HTML

 

 products/Sources/formale Sprachen/C/Firefox/testing/web-platform/tests/cors/preflight-failure.htm


<!DOCTYPE html>
<meta charset=utf-8>
<title>CORS - Preflight responds with non-2XX status code</title>
<meta name=author title="Fernando Jiménez Moreno" href="mailto:ferjmoreno@gmail.com">

<script src=/resources/testharness.js></script>
<script src=/resources/testharnessreport.js></script>
<script src=/common/get-host-info.sub.js></script>

<h1>Preflight responds with non-2XX status code</h1>

<div id=log></div>
<script>

// Request count for cache busting and easy identifying of request in traffic
// analyzer.
var req_c = 0;

var CROSSDOMAIN_URL = get_host_info().HTTP_REMOTE_ORIGIN + '/cors/resources/cors-makeheader.py?';

/*
 * Redirection with preflights.
 */
function preflight_failure(code) {
  var isCodeOK = code >= 200 && code <= 299,
      descOK = isCodeOK ? 'succeed' : 'throw error',
      desc = 'Should ' + descOK + ' if preflight has status ' + code;
  async_test(desc).step(function() {
    var client = new XMLHttpRequest();
    var redirect =
      encodeURIComponent(CROSSDOMAIN_URL + 'headers=x-test&' + req_c++);

    client.open('GET',
        CROSSDOMAIN_URL + 'headers=x-test&location=' + redirect
        + '&code=' + code + '&preflight=' + code
        + '&' + req_c++,
        true /* async */);
    client.setRequestHeader('x-test', 'test');
    client.onerror = this.step_func(function() {
      assert_false(isCodeOK);
      this.done();
    });
    client.onreadystatechange = this.step_func(function() {
      if (!isCodeOK)
        assert_equals(client.status, 0);
    });
    client.onload = this.step_func(function() {
      assert_true(isCodeOK);
      this.done();
    });
    client.send(null);
  });
}
[200, 299,
 300, 301, 302, 303, 304, 305, 306, 307, 308,
 400, 401, 402, 403, 404, 405, 406, 407, 408, 409, 410, 411, 412, 413, 414, 415, 416, 417,
 500, 501, 502, 503, 504, 505,
 680,
 790
].forEach(preflight_failure);

</script>

Messung
CHZG
829910093

¤ Dauer der Verarbeitung: 0.1 Sekunden  (vorverarbeitet am  2026-11-08) ¤

*© Formatika GbR, Deutschland






Wurzel

Suchen

PVS Prover

Isabelle Prover


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.






                                                                                                                                                                                                                                                                                                                                                                                                     


Neuigkeiten

Aktuelles
Motto des Tages

Open Source Software


Jenseits des Üblichen

Besucherstatistik

Besucherstatistik

Statistik
#Sources=1102655
#Domains=556670