mirror of
https://github.com/servo/servo.git
synced 2025-08-05 13:40:08 +01:00
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.
This commit is contained in:
parent
f65cb94b9e
commit
e73528e5fc
3 changed files with 2 additions and 5 deletions
|
@ -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>)>) {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue