aboutsummaryrefslogtreecommitdiffstats
path: root/components
diff options
context:
space:
mode:
authorBen <ben@tycheon.ca>2016-02-16 15:42:07 -0700
committerBen <ben@tycheon.ca>2016-02-16 15:42:07 -0700
commit1ccb642ee4ad1eec7802df1e27244b9f91651e3e (patch)
treecc1aa0f3c8600bf807de9f119f03dbf70f90b367 /components
parent7aedb9c7cdcc1b67c1d6d01f36f2fe7c1a17ddac (diff)
downloadservo-1ccb642ee4ad1eec7802df1e27244b9f91651e3e.tar.gz
servo-1ccb642ee4ad1eec7802df1e27244b9f91651e3e.zip
CORS Preflight Logic Fix
Fix check to set flag if any header is a simple header. Fix failing tests to allow merge in advance of @nikkibee's changes as per @jdm's direction via IRC
Diffstat (limited to 'components')
-rw-r--r--components/script/cors.rs2
1 files changed, 1 insertions, 1 deletions
diff --git a/components/script/cors.rs b/components/script/cors.rs
index e64583e0a58..0c225db1b1d 100644
--- a/components/script/cors.rs
+++ b/components/script/cors.rs
@@ -77,7 +77,7 @@ impl CORSRequest {
let mut req = CORSRequest::new(referer, destination, mode, method, headers);
req.preflight_flag = !is_simple_method(&req.method) ||
mode == RequestMode::ForcedPreflight;
- if req.headers.iter().all(|h| is_simple_header(&h)) {
+ if req.headers.iter().any(|h| !is_simple_header(&h)) {
req.preflight_flag = true;
}
Ok(Some(req))