Quellcodebibliothek Statistik Leitseite products/Sources/formale Sprachen/C/Firefox/toolkit/components/normandy/test/unit/   (Browser von der Mozilla Stiftung Version 136.0.1©)  Datei vom 10.2.2025 mit Größe 658 B image not shown  

Quelle  echo_server.sjs   Sprache: unbekannt

 
/**
 * Reads an HTTP status code and response body from the querystring and sends
 * back a matching response.
 */
function handleRequest(request, response) {
  // Allow cross-origin, so you can XHR to it!
  response.setHeader("Access-Control-Allow-Origin", "*", false);
  // Avoid confusing cache behaviors
  response.setHeader("Cache-Control", "no-cache", false);

  const params = request.queryString.split("&");
  for (const param of params) {
    const [key, value] = param.split("=");
    if (key === "status") {
      response.setStatusLine(null, value);
    } else if (key === "body") {
      response.write(value);
    }
  }
  response.write("");
}

[ Dauer der Verarbeitung: 0.16 Sekunden  (vorverarbeitet)  ]