mirror of
https://github.com/servo/servo.git
synced 2025-07-23 07:13:52 +01:00
Qualify hyper enums.
This commit is contained in:
parent
3be587606f
commit
b16f9cea09
8 changed files with 33 additions and 32 deletions
|
@ -3,8 +3,8 @@
|
|||
* file, You can obtain one at http://mozilla.org/MPL/2.0/. */
|
||||
|
||||
use url::Url;
|
||||
use hyper::method::{Get, Method};
|
||||
use hyper::mime::{Mime, Text, Html, Charset, Utf8};
|
||||
use hyper::method::Method;
|
||||
use hyper::mime::{mod, Mime};
|
||||
use hyper::header::Headers;
|
||||
use hyper::header::common::ContentType;
|
||||
use fetch::cors_cache::CORSCache;
|
||||
|
@ -87,7 +87,7 @@ pub struct Request {
|
|||
impl Request {
|
||||
pub fn new(url: Url, context: Context) -> Request {
|
||||
Request {
|
||||
method: Get,
|
||||
method: Method::Get,
|
||||
url: url,
|
||||
headers: Headers::new(),
|
||||
unsafe_request: false,
|
||||
|
@ -118,7 +118,9 @@ impl Request {
|
|||
"about" => match self.url.non_relative_scheme_data() {
|
||||
Some(s) if s.as_slice() == "blank" => {
|
||||
let mut response = Response::new();
|
||||
response.headers.set(ContentType(Mime(Text, Html, vec![(Charset, Utf8)])));
|
||||
response.headers.set(ContentType(Mime(
|
||||
mime::TopLevel::Text, mime::SubLevel::Html,
|
||||
vec![(mime::Attr::Charset, mime::Value::Utf8)])));
|
||||
response
|
||||
},
|
||||
_ => Response::network_error()
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue