mirror of
https://github.com/servo/servo.git
synced 2025-08-02 04:00:32 +01:00
Use qitem rather than QualityItem::new in XHR.
This is more future-proof.
This commit is contained in:
parent
19cd87aefc
commit
347f395f4f
1 changed files with 2 additions and 2 deletions
|
@ -33,7 +33,7 @@ use encoding::label::encoding_from_whatwg_label;
|
|||
use encoding::types::{DecoderTrap, Encoding, EncodingRef, EncoderTrap};
|
||||
|
||||
use hyper::header::Headers;
|
||||
use hyper::header::{Accept, ContentLength, ContentType, QualityItem};
|
||||
use hyper::header::{Accept, ContentLength, ContentType, qitem};
|
||||
use hyper::http::RawStatus;
|
||||
use hyper::mime::{self, Mime};
|
||||
use hyper::method::Method;
|
||||
|
@ -586,7 +586,7 @@ impl<'a> XMLHttpRequestMethods for JSRef<'a, XMLHttpRequest> {
|
|||
|
||||
if !load_data.preserved_headers.has::<Accept>() {
|
||||
let mime = Mime(mime::TopLevel::Star, mime::SubLevel::Star, vec![]);
|
||||
load_data.preserved_headers.set(Accept(vec![QualityItem::new(mime, 1.0)]));
|
||||
load_data.preserved_headers.set(Accept(vec![qitem(mime)]));
|
||||
}
|
||||
|
||||
load_data.method = (*self.request_method.borrow()).clone();
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue