aboutsummaryrefslogtreecommitdiffstats
path: root/components/script/dom/response.rs
diff options
context:
space:
mode:
authorglowe <graham@spinlag.com>2019-11-05 19:54:50 -0500
committerglowe <graham@spinlag.com>2019-11-14 01:25:20 -0500
commite73528e5fc834a5fe37fdcefb3b87f1b87a23241 (patch)
tree3cdea132b3539b63488dc497356eef9662fc82cf /components/script/dom/response.rs
parentf65cb94b9e417bdaab6fd8d699bf213ae55cd740 (diff)
downloadservo-e73528e5fc834a5fe37fdcefb3b87f1b87a23241.tar.gz
servo-e73528e5fc834a5fe37fdcefb3b87f1b87a23241.zip
Set response mime_type based on Content-Type
Set the response's mime_type based on its Content-Type header whenever Response::set_headers is called. Fixes #24628.
Diffstat (limited to 'components/script/dom/response.rs')
-rw-r--r--components/script/dom/response.rs1
1 files changed, 1 insertions, 0 deletions
diff --git a/components/script/dom/response.rs b/components/script/dom/response.rs
index d618c9823e4..184e5ff8888 100644
--- a/components/script/dom/response.rs
+++ b/components/script/dom/response.rs
@@ -403,6 +403,7 @@ impl Response {
Some(hyper_headers) => hyper_headers.into_inner(),
None => HyperHeaders::new(),
});
+ *self.mime_type.borrow_mut() = self.Headers().extract_mime_type();
}
pub fn set_raw_status(&self, status: Option<(u16, Vec<u8>)>) {