mirror of
https://github.com/servo/servo.git
synced 2025-08-03 04:30:10 +01:00
Auto merge of #13004 - jeenalee:combine-headers, r=jdm
Update DOM headers `append` and `delete` <!-- Please describe your changes on the following line: --> Two changes are included in this PR: 1. A resolved TODO comment in `delete` is removed. 2. `append` method adds a space after a comma when combining header values. Expected wpt results are updated with this change. --- <!-- Thank you for contributing to Servo! Please replace each `[ ]` by `[X]` when the step is complete, and replace `__` with appropriate data: --> - [X] `./mach build -d` does not report any errors - [X] `./mach test-tidy` does not report any errors - [ ] These changes fix #__ (github issue number if applicable). <!-- Either: --> - [X] There are tests for these changes OR - [ ] These changes do not require tests because _____ <!-- Pull requests that do not address these steps are welcome, but they will require additional verification as part of the review process. --> <!-- Reviewable:start --> --- This change is [<img src="https://reviewable.io/review_button.svg" height="34" align="absmiddle" alt="Reviewable"/>](https://reviewable.io/reviews/servo/servo/13004) <!-- Reviewable:end -->
This commit is contained in:
commit
7264592397
1 changed files with 1 additions and 3 deletions
|
@ -87,7 +87,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]);
|
||||
|
@ -107,8 +107,6 @@ impl HeadersMethods for Headers {
|
|||
return Ok(());
|
||||
}
|
||||
// Step 4
|
||||
// TODO: Requires clarification from the Fetch spec:
|
||||
// ... https://github.com/whatwg/fetch/issues/372
|
||||
if self.guard.get() == Guard::RequestNoCors &&
|
||||
!is_cors_safelisted_request_header(&valid_name, &b"invalid".to_vec()) {
|
||||
return Ok(());
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue