Skip to content

Commit

Permalink
Refactor combine method, and update expected wpt results
Browse files Browse the repository at this point in the history
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 (web-platform-tests/wpt#3646). The expected
web platform test results that will be affected by this change are updated.
  • Loading branch information
jeenalee committed Sep 6, 2016
1 parent 2c4b268 commit 8946a65
Show file tree
Hide file tree
Showing 2 changed files with 1 addition and 9 deletions.
2 changes: 1 addition & 1 deletion components/script/dom/headers.rs
Expand Up @@ -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]);
Expand Down
8 changes: 0 additions & 8 deletions tests/wpt/metadata/fetch/api/headers/headers-combine.html.ini

This file was deleted.

0 comments on commit 8946a65

Please sign in to comment.