implemented secure_connection_start

This commit is contained in:
Tomas Di Vito 2019-08-07 14:47:50 -03:00
parent cf725fc3f5
commit bd0c0b65ba
3 changed files with 18 additions and 2 deletions

View file

@ -408,6 +408,17 @@ fn obtain_response(
)
.body(request_body.clone().into());
// TODO: We currently don't know when the handhhake before the connection is done
// so our best bet would be to set `secure_connection_start` here when we are currently
// fetching on a HTTPS url.
if url.scheme() == "https" {
context
.timing
.lock()
.unwrap()
.set_attribute(ResourceAttribute::SecureConnectionStart);
}
let mut request = match request {
Ok(request) => request,
Err(e) => return Box::new(future::result(Err(NetworkError::from_http_error(&e)))),