aboutsummaryrefslogtreecommitdiffstats
path: root/components/script/fetch.rs
diff options
context:
space:
mode:
authorbors-servo <lbergstrom+bors@mozilla.com>2019-10-11 10:45:58 -0400
committerGitHub <noreply@github.com>2019-10-11 10:45:58 -0400
commit723df4abcf90d626cb7232e40c9bcef449ebd334 (patch)
treedb830b1c827dd0846baa0842034e5dcb89c8b7d0 /components/script/fetch.rs
parent46b048c0a5e25579496b32e629db9009c675e3fe (diff)
parent0f1ddc6feaf87d30eeba310e370c75991bfadcff (diff)
downloadservo-723df4abcf90d626cb7232e40c9bcef449ebd334.tar.gz
servo-723df4abcf90d626cb7232e40c9bcef449ebd334.zip
Auto merge of #24379 - PeaceRebel:dom_response_check_opaque_filter, r=jdm
Dom response check opaque filter <!-- Please describe your changes on the following line: --> Added setters for url_list, status, and body in `Response`. Response members are set for [Network Error](https://fetch.spec.whatwg.org/#concept-network-error), [Opaque](https://fetch.spec.whatwg.org/#concept-filtered-response-opaque) and [Opaque-redirect](https://fetch.spec.whatwg.org/#concept-filtered-response-opaque-redirect) responses. --- <!-- 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 - [X] These changes fix #24372 (GitHub issue number if applicable) <!-- Either: --> - [x] There are tests for these changes <!-- Also, please make sure that "Allow edits from maintainers" checkbox is checked, so that we can help you if you get stuck somewhere along the way.--> <!-- 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/24379) <!-- Reviewable:end -->
Diffstat (limited to 'components/script/fetch.rs')
-rw-r--r--components/script/fetch.rs18
1 files changed, 10 insertions, 8 deletions
diff --git a/components/script/fetch.rs b/components/script/fetch.rs
index 8c31f24f260..045e9b93eda 100644
--- a/components/script/fetch.rs
+++ b/components/script/fetch.rs
@@ -239,14 +239,16 @@ impl FetchResponseListener for FetchContext {
fill_headers_with_metadata(self.response_object.root(), m);
self.response_object.root().set_type(DOMResponseType::Cors);
},
- FilteredMetadata::Opaque => self
- .response_object
- .root()
- .set_type(DOMResponseType::Opaque),
- FilteredMetadata::OpaqueRedirect => self
- .response_object
- .root()
- .set_type(DOMResponseType::Opaqueredirect),
+ FilteredMetadata::Opaque => {
+ self.response_object
+ .root()
+ .set_type(DOMResponseType::Opaque);
+ },
+ FilteredMetadata::OpaqueRedirect => {
+ self.response_object
+ .root()
+ .set_type(DOMResponseType::Opaqueredirect);
+ },
},
},
}