diff options
author | bors-servo <lbergstrom+bors@mozilla.com> | 2016-09-12 09:21:52 -0500 |
---|---|---|
committer | GitHub <noreply@github.com> | 2016-09-12 09:21:52 -0500 |
commit | 72645923972aab03e589510b252abcff13ec5b9b (patch) | |
tree | b8305ea0cb8ceb5681a94ac741dfa3a55dc03aea /components/script/dom/headers.rs | |
parent | 4e718752f56aafb63d15e6eba5eb66df3efa23b3 (diff) | |
parent | 8946a65c5a19dcf9b64fc3446467d62de3a41d62 (diff) | |
download | servo-72645923972aab03e589510b252abcff13ec5b9b.tar.gz servo-72645923972aab03e589510b252abcff13ec5b9b.zip |
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 -->
Diffstat (limited to 'components/script/dom/headers.rs')
-rw-r--r-- | components/script/dom/headers.rs | 4 |
1 files changed, 1 insertions, 3 deletions
diff --git a/components/script/dom/headers.rs b/components/script/dom/headers.rs index abfa959c8e6..b977110955c 100644 --- a/components/script/dom/headers.rs +++ b/components/script/dom/headers.rs @@ -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(()); |