mirror of
https://github.com/servo/servo.git
synced 2025-07-24 15:50:21 +01:00
Use Mime::get_param
This commit is contained in:
parent
d1d79bf947
commit
dbef324e48
1 changed files with 3 additions and 5 deletions
|
@ -553,12 +553,10 @@ impl Metadata {
|
||||||
.as_mut()
|
.as_mut()
|
||||||
.unwrap()
|
.unwrap()
|
||||||
.typed_insert(ContentType::from(mime.clone()));
|
.typed_insert(ContentType::from(mime.clone()));
|
||||||
self.content_type = Some(Serde(ContentType::from(mime.clone())));
|
if let Some(charset) = mime.get_param(mime::CHARSET) {
|
||||||
for (name, value) in mime.params() {
|
self.charset = Some(charset.to_string());
|
||||||
if mime::CHARSET == name {
|
|
||||||
self.charset = Some(value.to_string());
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
self.content_type = Some(Serde(ContentType::from(mime.clone())));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue