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:
glowe 2019-11-05 19:54:50 -05:00
parent f65cb94b9e
commit e73528e5fc
3 changed files with 2 additions and 5 deletions

View file

@ -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>)>) {

View file

@ -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

View file

@ -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