mirror of
https://github.com/servo/servo.git
synced 2025-08-03 20:50:07 +01:00
Use Url::port instead of Url::port_or_known_default to set Host
AFAIK, if there is no explicit port in the request URL, there should be no explicit port in the Host header.
This commit is contained in:
parent
92c4a43946
commit
b096bf4806
1 changed files with 1 additions and 1 deletions
|
@ -907,7 +907,7 @@ fn http_network_or_cache_fetch(request: Rc<Request>,
|
||||||
let headers = &mut *http_request.headers.borrow_mut();
|
let headers = &mut *http_request.headers.borrow_mut();
|
||||||
let host = Host {
|
let host = Host {
|
||||||
hostname: current_url.host_str().unwrap().to_owned(),
|
hostname: current_url.host_str().unwrap().to_owned(),
|
||||||
port: current_url.port_or_known_default()
|
port: current_url.port()
|
||||||
};
|
};
|
||||||
headers.set(host);
|
headers.set(host);
|
||||||
// unlike http_loader, we should not set the accept header
|
// unlike http_loader, we should not set the accept header
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue