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

Unified Diff: third_party/WebKit/LayoutTests/http/tests/xmlhttprequest/resources/access-control-preflight-request-header-sorted.php

Issue 1890053002: Exclude simple headers when building Access-Control-Request-Headers (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Rebase Created 4 years, 8 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 side-by-side diff with in-line comments
Download patch
Index: third_party/WebKit/LayoutTests/http/tests/xmlhttprequest/resources/access-control-preflight-request-header-sorted.php
diff --git a/third_party/WebKit/LayoutTests/http/tests/xmlhttprequest/resources/access-control-preflight-request-header-sorted.php b/third_party/WebKit/LayoutTests/http/tests/xmlhttprequest/resources/access-control-preflight-request-header-sorted.php
index b52580f312de82dc3df4d259825210a038e42177..7b93ce761c0101395bf7c5ab63c51c7155bb2c73 100644
--- a/third_party/WebKit/LayoutTests/http/tests/xmlhttprequest/resources/access-control-preflight-request-header-sorted.php
+++ b/third_party/WebKit/LayoutTests/http/tests/xmlhttprequest/resources/access-control-preflight-request-header-sorted.php
@@ -1,11 +1,13 @@
<?php
if ($_SERVER["REQUEST_METHOD"] == "OPTIONS") {
- // Check that the names in Access-Control-Request-Headers are
- // "sorted lexicographically, and byte lowercased".
+ // Check the Access-Control-Request-Headers that:
+ // - simple headers are not included
+ // - names in it are sorted lexicographically and byte lowercased
+ //
// Fetch API Spec: https://fetch.spec.whatwg.org/#cors-preflight-fetch-0
if ($_SERVER["HTTP_ACCESS_CONTROL_REQUEST_HEADERS"] ==
- 'content-type, x-custom-s, x-custom-test, x-custom-u, x-custom-ua, x-custom-v') {
- header("Access-Control-Allow-Headers: content-type, x-custom-s, x-custom-test, x-custom-u, x-custom-ua, x-custom-v");
+ 'x-custom-s, x-custom-test, x-custom-u, x-custom-ua, x-custom-v') {
+ header("Access-Control-Allow-Headers: x-custom-s, x-custom-test, x-custom-u, x-custom-ua, x-custom-v");
} else {
header("HTTP/1.1 400");
}

Powered by Google App Engine
This is Rietveld 408576698