mirror of
https://github.com/servo/servo.git
synced 2025-08-06 14:10:11 +01:00
Move the HTTP connector to FetchContext
This commit is contained in:
parent
7b16021a89
commit
016fee016b
6 changed files with 23 additions and 13 deletions
|
@ -23,6 +23,7 @@ use hyper::status::StatusCode;
|
|||
use hyper::uri::RequestUri;
|
||||
use hyper_openssl;
|
||||
use msg::constellation_msg::TEST_PIPELINE_ID;
|
||||
use net::connector::{create_http_connector, create_ssl_client};
|
||||
use net::fetch::cors_cache::CorsCache;
|
||||
use net::fetch::methods::FetchContext;
|
||||
use net::filemanager_thread::FileManager;
|
||||
|
@ -529,11 +530,15 @@ fn test_fetch_with_hsts() {
|
|||
//takes an address and something that implements hyper::net::Ssl
|
||||
let mut server = Server::https("0.0.0.0:0", ssl).unwrap().handle_threads(handler, 1).unwrap();
|
||||
|
||||
let ssl_client = create_ssl_client("self_signed_certificate_for_testing.crt");
|
||||
let connector = create_http_connector(ssl_client);
|
||||
|
||||
let context = FetchContext {
|
||||
state: HttpState::new("self_signed_certificate_for_testing.crt"),
|
||||
state: HttpState::new(),
|
||||
user_agent: DEFAULT_USER_AGENT.into(),
|
||||
devtools_chan: None,
|
||||
filemanager: FileManager::new(),
|
||||
connector: connector,
|
||||
};
|
||||
|
||||
{
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue