Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(312)

Side by Side Diff: LayoutTests/http/tests/xmlhttprequest/resources/access-control-preflight-request-header-sorted.php

Issue 875363002: Sort header names in Access-Control-Request-Headers (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Add missing expect.txt Created 5 years, 10 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
(Empty)
1 <?php
2 require_once '../../resources/portabilityLayer.php';
tyoshino (SeeGerritForStatus) 2015/01/29 10:44:53 is this needed?
hiroshige 2015/01/29 11:08:11 Removed. Also removed from *-lowercase.php, based
3
4 header("Access-Control-Allow-Origin: *");
5 header("Access-Control-Max-Age: 0");
6
7 if ($_SERVER["REQUEST_METHOD"] == "OPTIONS") {
8 // Check that the names in Access-Control-Request-Headers are
9 // "in lexicographical order, each converted to ASCII lowercase".
10 // Spec: http://www.w3.org/TR/cors/#cross-origin-request-with-preflight-0
tyoshino (SeeGerritForStatus) 2015/01/29 10:44:53 please cite fetch.spec.whatwg.org
hiroshige 2015/01/29 11:08:11 Done.
11 if ($_SERVER["HTTP_ACCESS_CONTROL_REQUEST_HEADERS"] ==
12 'x-custom-s, x-custom-test, x-custom-u, x-custom-ua, x-custom-v') {
13 header("Access-Control-Allow-Headers: x-custom-s, x-custom-test, x-custo m-u, x-custom-ua, x-custom-v");
14 } else {
15 header("HTTP/1.1 400");
tyoshino (SeeGerritForStatus) 2015/01/29 10:44:53 does this work even after calling header() emittin
hiroshige 2015/01/29 11:08:11 Done.
16 }
17 } else if ($_SERVER["REQUEST_METHOD"] == "GET") {
18 if (isset($_SERVER["HTTP_X_CUSTOM_S"]))
19 echo "PASS";
20 else
21 echo "FAIL";
22 }
23 ?>
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698