Cleanup CORSCache

Remove the CORSCache trait, CORSCacheSender, CORSCacheThreadMsg, and
CORSCacheThread. Rename BasicCORSCache to CORSCache and keep its old
implementation of CORSCache.
This commit is contained in:
Daniel Robertson 2016-04-27 16:56:20 -04:00
parent 153059c55c
commit 483f07c8f0
No known key found for this signature in database
GPG key ID: 318E3B2F84272FD8
3 changed files with 44 additions and 195 deletions

View file

@ -13,7 +13,7 @@ use hyper::server::{Handler, Listening, Server};
use hyper::server::{Request as HyperRequest, Response as HyperResponse};
use hyper::status::StatusCode;
use hyper::uri::RequestUri;
use net::fetch::cors_cache::{BasicCORSCache, CacheRequestDetails, CORSCache};
use net::fetch::cors_cache::{CacheRequestDetails, CORSCache};
use net::fetch::methods::{fetch, fetch_async, fetch_with_cors_cache};
use net_traits::AsyncFetchListener;
use net_traits::request::{Origin, RedirectMode, Referer, Request, RequestMode};
@ -181,7 +181,7 @@ fn test_cors_preflight_cache_fetch() {
static ACK: &'static [u8] = b"ACK";
let state = Arc::new(AtomicUsize::new(0));
let counter = state.clone();
let mut cache = BasicCORSCache::new();
let mut cache = CORSCache::new();
let handler = move |request: HyperRequest, mut response: HyperResponse| {
if request.method == Method::Options && state.clone().fetch_add(1, Ordering::SeqCst) == 0 {
assert!(request.headers.has::<AccessControlRequestMethod>());