Upgrade Hyper

This commit is contained in:
Naveen Gattu 2021-12-23 11:15:35 -08:00
parent 5df705a41f
commit a48a111cee
42 changed files with 872 additions and 891 deletions

View file

@ -21,9 +21,9 @@ use crate::response::{HttpsState, Response, ResponseInit};
use crate::storage_thread::StorageThreadMsg;
use cookie::Cookie;
use headers::{ContentType, HeaderMapExt, ReferrerPolicy as ReferrerPolicyHeader};
use http::StatusCode;
use http::{Error as HttpError, HeaderMap};
use hyper::Error as HyperError;
use hyper::StatusCode;
use hyper_serde::Serde;
use ipc_channel::ipc::{self, IpcReceiver, IpcSender};
use ipc_channel::router::ROUTER;
@ -759,7 +759,7 @@ pub enum NetworkError {
impl NetworkError {
pub fn from_hyper_error(error: &HyperError, cert_bytes: Option<Vec<u8>>) -> Self {
let s = error.to_string();
if s.contains("the handshake failed") {
if s.to_lowercase().contains("ssl") {
NetworkError::SslValidation(s, cert_bytes.unwrap_or_default())
} else {
NetworkError::Internal(s)