mirror of
https://github.com/servo/servo.git
synced 2025-07-23 07:13:52 +01:00
Always set the Document::contentType attribute in ScriptThread::load().
There's no good reason to limit this to a few particular content types.
This commit is contained in:
parent
c853337d64
commit
69e3173047
7 changed files with 3 additions and 39 deletions
|
@ -1718,15 +1718,9 @@ impl ScriptThread {
|
|||
headers.get().map(|&LastModified(HttpDate(ref tm))| dom_last_modified(tm))
|
||||
});
|
||||
|
||||
let content_type = metadata.content_type.as_ref().and_then(|&Serde(ContentType(ref mimetype))| {
|
||||
match *mimetype {
|
||||
Mime(TopLevel::Application, SubLevel::Xml, _) |
|
||||
Mime(TopLevel::Application, SubLevel::Ext(_), _) |
|
||||
Mime(TopLevel::Text, SubLevel::Xml, _) |
|
||||
Mime(TopLevel::Text, SubLevel::Plain, _) => Some(DOMString::from(mimetype.to_string())),
|
||||
_ => None,
|
||||
}
|
||||
});
|
||||
let content_type = metadata.content_type
|
||||
.as_ref()
|
||||
.map(|&Serde(ContentType(ref mimetype))| DOMString::from(mimetype.to_string()));
|
||||
|
||||
let loader = DocumentLoader::new_with_threads(self.resource_threads.clone(),
|
||||
Some(final_url.clone()));
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue