mirror of
https://github.com/servo/servo.git
synced 2025-08-06 14:10:11 +01:00
#8539 Config preferences backend restructure
This commit is contained in:
parent
34fda66dfa
commit
8bfd4dc1e2
53 changed files with 1748 additions and 680 deletions
|
@ -22,7 +22,6 @@ use net_traits::request::Request;
|
|||
use net_traits::response::{HttpsState, Response, ResponseBody};
|
||||
use net_traits::{FetchMetadata, Metadata, ResourceFetchTiming};
|
||||
use servo_arc::Arc;
|
||||
use servo_config::prefs::PREFS;
|
||||
use servo_url::ServoUrl;
|
||||
use std::collections::HashMap;
|
||||
use std::ops::Bound;
|
||||
|
@ -766,11 +765,7 @@ impl HttpCache {
|
|||
/// Storing Responses in Caches.
|
||||
/// <https://tools.ietf.org/html/rfc7234#section-3>
|
||||
pub fn store(&mut self, request: &Request, response: &Response) {
|
||||
if PREFS
|
||||
.get("network.http-cache.disabled")
|
||||
.as_boolean()
|
||||
.unwrap_or(false)
|
||||
{
|
||||
if pref!(network.http_cache.disabled) {
|
||||
return;
|
||||
}
|
||||
if request.method != Method::GET {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue