mirror of
https://github.com/servo/servo.git
synced 2025-08-03 20:50:07 +01:00
Upgrade Hyper
This commit is contained in:
parent
5df705a41f
commit
a48a111cee
42 changed files with 872 additions and 891 deletions
|
@ -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)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue