mirror of
https://github.com/servo/servo.git
synced 2025-08-05 13:40:08 +01:00
Make Metadata use ContentType
This commit is contained in:
parent
fe81ce942a
commit
19ffab82f1
5 changed files with 47 additions and 18 deletions
|
@ -9,7 +9,9 @@ use resource_task::start_sending;
|
|||
use file_loader;
|
||||
|
||||
use url::Url;
|
||||
use hyper::header::ContentType;
|
||||
use hyper::http::RawStatus;
|
||||
use hyper::mime::{Mime, TopLevel, SubLevel};
|
||||
use util::resource_files::resources_dir_path;
|
||||
|
||||
use std::borrow::IntoCow;
|
||||
|
@ -22,7 +24,7 @@ pub fn factory(mut load_data: LoadData, classifier: Arc<MIMEClassifier>) {
|
|||
let start_chan = load_data.consumer;
|
||||
let chan = start_sending(start_chan, Metadata {
|
||||
final_url: load_data.url,
|
||||
content_type: Some(("text".to_string(), "html".to_string())),
|
||||
content_type: Some(ContentType(Mime(TopLevel::Text, SubLevel::Html, vec![]))),
|
||||
charset: Some("utf-8".to_string()),
|
||||
headers: None,
|
||||
status: Some(RawStatus(200, "OK".into_cow())),
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue