format
This commit is contained in:
@@ -1,11 +1,11 @@
|
|||||||
use std::io::Error as IoError;
|
use std::io::Error as IoError;
|
||||||
|
|
||||||
#[cfg(feature = "tls")]
|
|
||||||
use std::net::TcpStream;
|
|
||||||
#[cfg(feature = "tls")]
|
#[cfg(feature = "tls")]
|
||||||
use native_tls::Error as TlsError;
|
use native_tls::Error as TlsError;
|
||||||
#[cfg(feature = "tls")]
|
#[cfg(feature = "tls")]
|
||||||
use native_tls::HandshakeError;
|
use native_tls::HandshakeError;
|
||||||
|
#[cfg(feature = "tls")]
|
||||||
|
use std::net::TcpStream;
|
||||||
|
|
||||||
/// Errors that are translated to ["synthetic" responses](struct.Response.html#method.synthetic).
|
/// Errors that are translated to ["synthetic" responses](struct.Response.html#method.synthetic).
|
||||||
#[derive(Debug)]
|
#[derive(Debug)]
|
||||||
|
|||||||
@@ -251,7 +251,8 @@ impl Response {
|
|||||||
//
|
//
|
||||||
|
|
||||||
let is_http10 = self.http_version().eq_ignore_ascii_case("HTTP/1.0");
|
let is_http10 = self.http_version().eq_ignore_ascii_case("HTTP/1.0");
|
||||||
let is_close = self.header("connection")
|
let is_close = self
|
||||||
|
.header("connection")
|
||||||
.map(|c| c.eq_ignore_ascii_case("close"))
|
.map(|c| c.eq_ignore_ascii_case("close"))
|
||||||
.unwrap_or(false);
|
.unwrap_or(false);
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user