mirror of
https://github.com/servo/servo.git
synced 2025-09-30 00:29:14 +01:00
#32024 broke a different set of nginx sites, and a more sophisticated fix for the case of a missing HTTP 1.1 `Host` header is required.
This commit is contained in:
parent
f5bdfdfe94
commit
7a507a4d5b
3 changed files with 1 additions and 25 deletions
|
@ -1359,15 +1359,6 @@ fn test_fetch_with_devtools() {
|
|||
|
||||
headers.typed_insert::<UserAgent>(DEFAULT_USER_AGENT.parse().unwrap());
|
||||
|
||||
let host = if url.port().is_none() {
|
||||
url.host_str().unwrap().to_string()
|
||||
} else {
|
||||
format!("{}:{}", url.host_str().unwrap(), url.port().unwrap())
|
||||
};
|
||||
headers.typed_insert(headers::Host::from(
|
||||
host.parse::<http::uri::Authority>().unwrap(),
|
||||
));
|
||||
|
||||
headers.insert(
|
||||
header::ACCEPT_ENCODING,
|
||||
HeaderValue::from_static("gzip, deflate, br"),
|
||||
|
|
|
@ -266,8 +266,6 @@ fn test_request_and_response_data_with_network_messages() {
|
|||
//Creating default headers for request
|
||||
let mut headers = HeaderMap::new();
|
||||
|
||||
headers.insert(header::HOST, HeaderValue::from_static("bar.foo"));
|
||||
|
||||
headers.insert(
|
||||
header::ACCEPT,
|
||||
HeaderValue::from_static("text/html,application/xhtml+xml,application/xml;q=0.9,*/*;q=0.8"),
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue