aboutsummaryrefslogtreecommitdiffstats
path: root/components/script
diff options
context:
space:
mode:
authorJeena Lee <ijeenalee@gmail.com>2016-08-23 16:01:08 -0700
committerJeena Lee <ijeenalee@gmail.com>2016-09-06 11:31:39 -0700
commit8946a65c5a19dcf9b64fc3446467d62de3a41d62 (patch)
tree12793fa1580ed83d254a4b5c9c48fee0d27669f9 /components/script
parent2c4b268a454890b61edd0a71bc4257857ba2ab08 (diff)
downloadservo-8946a65c5a19dcf9b64fc3446467d62de3a41d62.tar.gz
servo-8946a65c5a19dcf9b64fc3446467d62de3a41d62.zip
Refactor combine method, and update expected wpt results
Instead of creating an array with length of 1 of `b','`, then pushing the first element of that array to `combined_value`, push a `b','` directly to `combined_value`. The web platform test for combining headers has been updated to reflect the Fetch spec (https://github.com/w3c/web-platform-tests/pull/3646). The expected web platform test results that will be affected by this change are updated.
Diffstat (limited to 'components/script')
-rw-r--r--components/script/dom/headers.rs2
1 files changed, 1 insertions, 1 deletions
diff --git a/components/script/dom/headers.rs b/components/script/dom/headers.rs
index 70908fb4dfb..4ed9a5aebec 100644
--- a/components/script/dom/headers.rs
+++ b/components/script/dom/headers.rs
@@ -85,7 +85,7 @@ impl HeadersMethods for Headers {
let mut combined_value: Vec<u8> = vec![];
if let Some(v) = self.header_list.borrow().get_raw(&valid_name) {
combined_value = v[0].clone();
- combined_value.push(b","[0]);
+ combined_value.push(b',');
}
combined_value.extend(valid_value.iter().cloned());
self.header_list.borrow_mut().set_raw(valid_name, vec![combined_value]);