mirror of
https://github.com/servo/servo.git
synced 2025-06-25 09:34:32 +01:00
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.
This commit is contained in:
parent
2c4b268a45
commit
8946a65c5a
2 changed files with 1 additions and 9 deletions
|
@ -85,7 +85,7 @@ impl HeadersMethods for Headers {
|
||||||
let mut combined_value: Vec<u8> = vec![];
|
let mut combined_value: Vec<u8> = vec![];
|
||||||
if let Some(v) = self.header_list.borrow().get_raw(&valid_name) {
|
if let Some(v) = self.header_list.borrow().get_raw(&valid_name) {
|
||||||
combined_value = v[0].clone();
|
combined_value = v[0].clone();
|
||||||
combined_value.push(b","[0]);
|
combined_value.push(b',');
|
||||||
}
|
}
|
||||||
combined_value.extend(valid_value.iter().cloned());
|
combined_value.extend(valid_value.iter().cloned());
|
||||||
self.header_list.borrow_mut().set_raw(valid_name, vec![combined_value]);
|
self.header_list.borrow_mut().set_raw(valid_name, vec![combined_value]);
|
||||||
|
|
|
@ -1,8 +0,0 @@
|
||||||
[headers-combine.html]
|
|
||||||
type: testharness
|
|
||||||
[Create headers using same name for different values]
|
|
||||||
expected: FAIL
|
|
||||||
|
|
||||||
[Check append methods when called with already used name]
|
|
||||||
expected: FAIL
|
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue