Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Use NetworkConnector directly to account for replaced hosts #16131

Merged
merged 5 commits into from Mar 26, 2017

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.
  • Loading branch information
nox committed Mar 26, 2017
commit b096bf4806956600ab92339196efcfeee66e7f89
@@ -907,7 +907,7 @@ fn http_network_or_cache_fetch(request: Rc<Request>,
let headers = &mut *http_request.headers.borrow_mut();
let host = Host {
hostname: current_url.host_str().unwrap().to_owned(),
port: current_url.port_or_known_default()
port: current_url.port()
};
headers.set(host);
// unlike http_loader, we should not set the accept header
ProTip! Use n and p to navigate between commits in a pull request.
You can’t perform that action at this time.