mirror of
https://github.com/servo/servo.git
synced 2025-06-06 16:45:39 +00: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>)>) {
|
||||
|
|
|
@ -67,9 +67,6 @@
|
|||
[Consume response's body: from stream without correct urlencoded type to formData (error case)]
|
||||
expected: FAIL
|
||||
|
||||
[Consume response's body: from fetch to blob]
|
||||
expected: FAIL
|
||||
|
||||
[Consume response's body: from multipart form data blob to formData]
|
||||
expected: FAIL
|
||||
|
||||
|
|
|
@ -1,6 +1,5 @@
|
|||
[script-html-via-cross-origin-blob-url.sub.html]
|
||||
[Untitled]
|
||||
expected: FAIL
|
||||
expected: ERROR
|
||||
|
||||
[script-html-via-cross-origin-blob-url]
|
||||
expected: FAIL
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue