mirror of
https://github.com/servo/servo.git
synced 2025-07-30 18:50:36 +01:00
Cleanup blocking fetch operations with bad ports (#35324)
Blocking a fetch due to a bad port should be grouped together with CSP blocks as per the spec, but these steps were previously seperated. Additionally, remove handling of ftp in should_request_be_blocked_due_to_a_bad_port, since it did nothing anyways. Signed-off-by: Simon Wülker <simon.wuelker@arcor.de>
This commit is contained in:
parent
18b43d48fc
commit
0ebdf146fc
2 changed files with 21 additions and 42 deletions
|
@ -39,7 +39,7 @@ use url::Url;
|
|||
use crate::async_runtime::HANDLE;
|
||||
use crate::connector::{create_tls_config, CACertificates, TlsConfig};
|
||||
use crate::cookie::ServoCookie;
|
||||
use crate::fetch::methods::should_be_blocked_due_to_bad_port;
|
||||
use crate::fetch::methods::should_request_be_blocked_due_to_a_bad_port;
|
||||
use crate::hosts::replace_host;
|
||||
use crate::http_loader::HttpState;
|
||||
/// Create a tungstenite Request object for the initial HTTP request.
|
||||
|
@ -371,7 +371,7 @@ fn connect(
|
|||
|
||||
let req_url = req_builder.url.clone();
|
||||
|
||||
if should_be_blocked_due_to_bad_port(&req_url) {
|
||||
if should_request_be_blocked_due_to_a_bad_port(&req_url) {
|
||||
return Err("Port blocked".to_string());
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue