mirror of
https://github.com/servo/servo.git
synced 2025-08-07 14:35:33 +01:00
Move the SSL client in HttpState
This commit is contained in:
parent
21eafebd37
commit
949a0827e0
4 changed files with 19 additions and 17 deletions
|
@ -27,6 +27,7 @@ use hyper::header::{Pragma, Quality, QualityItem, Referer, SetCookie};
|
|||
use hyper::header::{UserAgent, q, qitem};
|
||||
use hyper::method::Method;
|
||||
use hyper::status::StatusCode;
|
||||
use hyper_openssl::OpensslClient;
|
||||
use hyper_serde::Serde;
|
||||
use log;
|
||||
use msg::constellation_msg::PipelineId;
|
||||
|
@ -68,14 +69,16 @@ pub struct HttpState {
|
|||
pub hsts_list: RwLock<HstsList>,
|
||||
pub cookie_jar: RwLock<CookieStorage>,
|
||||
pub auth_cache: RwLock<AuthCache>,
|
||||
pub ssl_client: OpensslClient,
|
||||
}
|
||||
|
||||
impl HttpState {
|
||||
pub fn new() -> HttpState {
|
||||
pub fn new(ssl_client: OpensslClient) -> HttpState {
|
||||
HttpState {
|
||||
hsts_list: RwLock::new(HstsList::new()),
|
||||
cookie_jar: RwLock::new(CookieStorage::new(150)),
|
||||
auth_cache: RwLock::new(AuthCache::new()),
|
||||
ssl_client: ssl_client,
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue