Move the SSL client in HttpState

This commit is contained in:
Anthony Ramine 2017-04-06 18:11:20 +02:00
parent 21eafebd37
commit 949a0827e0
4 changed files with 19 additions and 17 deletions

View file

@ -532,10 +532,10 @@ fn test_fetch_with_hsts() {
let ca_file = resources_dir_path().unwrap().join("self_signed_certificate_for_testing.crt");
let ssl_client = create_ssl_client(&ca_file);
let connector = create_http_connector(ssl_client);
let connector = create_http_connector(ssl_client.clone());
let context = FetchContext {
state: Arc::new(HttpState::new()),
state: Arc::new(HttpState::new(ssl_client)),
user_agent: DEFAULT_USER_AGENT.into(),
devtools_chan: None,
filemanager: FileManager::new(),

View file

@ -56,9 +56,9 @@ struct FetchResponseCollector {
fn new_fetch_context(dc: Option<Sender<DevtoolsControlMsg>>) -> FetchContext {
let ca_file = resources_dir_path().unwrap().join("certs");
let ssl_client = create_ssl_client(&ca_file);
let connector = create_http_connector(ssl_client);
let connector = create_http_connector(ssl_client.clone());
FetchContext {
state: Arc::new(HttpState::new()),
state: Arc::new(HttpState::new(ssl_client)),
user_agent: DEFAULT_USER_AGENT.into(),
devtools_chan: dc,
filemanager: FileManager::new(),