mirror of
https://github.com/servo/servo.git
synced 2025-08-03 04:30:10 +01:00
Let hyper automatically add a host header for HTTP/1
This commit is contained in:
parent
3f663d7ab2
commit
19226c5190
4 changed files with 7 additions and 40 deletions
|
@ -14,11 +14,8 @@ use devtools_traits::HttpRequest as DevtoolsHttpRequest;
|
|||
use devtools_traits::HttpResponse as DevtoolsHttpResponse;
|
||||
use headers::{AccessControlAllowCredentials, AccessControlAllowHeaders, AccessControlAllowOrigin};
|
||||
use headers::{AccessControlAllowMethods, AccessControlMaxAge, HeaderMapExt};
|
||||
use headers::{
|
||||
CacheControl, ContentLength, ContentType, Expires, Host, LastModified, Pragma, UserAgent,
|
||||
};
|
||||
use headers::{CacheControl, ContentLength, ContentType, Expires, LastModified, Pragma, UserAgent};
|
||||
use http::header::{self, HeaderMap, HeaderName, HeaderValue};
|
||||
use http::uri::Authority;
|
||||
use http::{Method, StatusCode};
|
||||
use hyper::body::Body;
|
||||
use hyper::{Request as HyperRequest, Response as HyperResponse};
|
||||
|
@ -1067,11 +1064,6 @@ fn test_fetch_with_devtools() {
|
|||
header::ACCEPT_ENCODING,
|
||||
HeaderValue::from_static("gzip, deflate, br"),
|
||||
);
|
||||
headers.typed_insert(Host::from(
|
||||
format!("{}:{}", url.host_str().unwrap(), url.port().unwrap())
|
||||
.parse::<Authority>()
|
||||
.unwrap(),
|
||||
));
|
||||
|
||||
headers.insert(header::ACCEPT, HeaderValue::from_static("*/*"));
|
||||
|
||||
|
|
|
@ -257,11 +257,6 @@ fn test_request_and_response_data_with_network_messages() {
|
|||
header::ACCEPT_ENCODING,
|
||||
HeaderValue::from_static("gzip, deflate, br"),
|
||||
);
|
||||
headers.typed_insert(Host::from(
|
||||
format!("{}:{}", url.host_str().unwrap(), url.port().unwrap())
|
||||
.parse::<Authority>()
|
||||
.unwrap(),
|
||||
));
|
||||
|
||||
headers.insert(
|
||||
header::ACCEPT,
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue