mirror of
https://github.com/servo/servo.git
synced 2025-08-05 13:40:08 +01:00
Update some code that's feature-gated under core.
This commit is contained in:
parent
29a36adbe7
commit
ba87666cdb
33 changed files with 104 additions and 107 deletions
|
@ -28,7 +28,7 @@ pub enum HeaderOrMethod {
|
|||
impl HeaderOrMethod {
|
||||
fn match_header(&self, header_name: &str) -> bool {
|
||||
match *self {
|
||||
HeaderOrMethod::HeaderData(ref s) => s.as_slice().eq_ignore_ascii_case(header_name),
|
||||
HeaderOrMethod::HeaderData(ref s) => s.eq_ignore_ascii_case(header_name),
|
||||
_ => false
|
||||
}
|
||||
}
|
||||
|
@ -294,10 +294,10 @@ impl CORSCacheTask {
|
|||
tx.send(());
|
||||
},
|
||||
CORSCacheTaskMsg::MatchHeader(request, header, tx) => {
|
||||
tx.send(self.cache.match_header(request, header.as_slice()));
|
||||
tx.send(self.cache.match_header(request, &header));
|
||||
},
|
||||
CORSCacheTaskMsg::MatchHeaderUpdate(request, header, new_max_age, tx) => {
|
||||
tx.send(self.cache.match_header_and_update(request, header.as_slice(), new_max_age));
|
||||
tx.send(self.cache.match_header_and_update(request, &header, new_max_age));
|
||||
},
|
||||
CORSCacheTaskMsg::MatchMethod(request, method, tx) => {
|
||||
tx.send(self.cache.match_method(request, method));
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue