diff options
author | Martin Robinson <mrobinson@igalia.com> | 2025-01-20 14:07:54 +0100 |
---|---|---|
committer | GitHub <noreply@github.com> | 2025-01-20 13:07:54 +0000 |
commit | 2965b2fda7046a25e0b919a8413994f081d85d44 (patch) | |
tree | a08ed5c936a64c6f094cf75efc7f347319752331 | |
parent | 9ceb957dd82235de96f71f950b89685ef2649c6a (diff) | |
download | servo-2965b2fda7046a25e0b919a8413994f081d85d44.tar.gz servo-2965b2fda7046a25e0b919a8413994f081d85d44.zip |
Remove `Preferences::network_tls_ignore_unexpected_eof` (#35080)
This workaround was introduced to handle an issue with the WPT server,
but it seems that it is no longer needed. This change removes the
prefernce and the workarond code.
Signed-off-by: Martin Robinson <mrobinson@igalia.com>
-rw-r--r-- | components/config/prefs.rs | 7 | ||||
-rw-r--r-- | components/net/decoder.rs | 5 | ||||
-rw-r--r-- | resources/wpt-prefs.json | 3 |
3 files changed, 2 insertions, 13 deletions
diff --git a/components/config/prefs.rs b/components/config/prefs.rs index 98c4076ed7d..9b693d82305 100644 --- a/components/config/prefs.rs +++ b/components/config/prefs.rs @@ -209,12 +209,6 @@ pub struct Preferences { pub network_http_cache_disabled: bool, pub network_local_directory_listing_enabled: bool, pub network_mime_sniff: bool, - /// Ignore `std::io::Error` with `ErrorKind::UnexpectedEof` received when a TLS connection - /// is closed without a close_notify. - /// - /// Used for tests because WPT server doesn't properly close the TLS connection. - // TODO: remove this when WPT server is updated to use a proper TLS implementation. - pub network_tls_ignore_unexpected_eof: bool, pub session_history_max_length: i64, /// The background color of shell's viewport. This will be used by OpenGL's `glClearColor`. pub shell_background_color_rgba: [f64; 4], @@ -378,7 +372,6 @@ impl Preferences { network_http_cache_disabled: false, network_local_directory_listing_enabled: false, network_mime_sniff: false, - network_tls_ignore_unexpected_eof: false, session_history_max_length: 20, shell_background_color_rgba: [1.0, 1.0, 1.0, 1.0], threadpools_async_runtime_workers_max: 6, diff --git a/components/net/decoder.rs b/components/net/decoder.rs index 4d0973cdac2..8d63b1c58b9 100644 --- a/components/net/decoder.rs +++ b/components/net/decoder.rs @@ -32,7 +32,6 @@ use http_body_util::BodyExt; use hyper::body::Body; use hyper::header::{HeaderValue, CONTENT_ENCODING, TRANSFER_ENCODING}; use hyper::Response; -use servo_config::pref; use tokio_util::codec::{BytesCodec, FramedRead}; use tokio_util::io::StreamReader; @@ -279,9 +278,7 @@ impl Stream for BodyStream { let all_content_read = self .content_length .map_or(false, |c| c.0 == self.total_read); - if self.is_secure_scheme && - (all_content_read || pref!(network_tls_ignore_unexpected_eof)) - { + if self.is_secure_scheme && all_content_read { let source = err.source(); let is_unexpected_eof = source .and_then(|e| e.downcast_ref::<io::Error>()) diff --git a/resources/wpt-prefs.json b/resources/wpt-prefs.json index 40776bf7b0e..7e2259b4762 100644 --- a/resources/wpt-prefs.json +++ b/resources/wpt-prefs.json @@ -1,5 +1,4 @@ { "dom_webxr_test": true, - "gfx_text_antialiasing_enabled": false, - "network_tls_ignore_unexpected_eof": true + "gfx_text_antialiasing_enabled": false } |