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>
This commit is contained in:
Martin Robinson 2025-01-20 14:07:54 +01:00 committed by GitHub
parent 9ceb957dd8
commit 2965b2fda7
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
3 changed files with 2 additions and 13 deletions

View file

@ -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,

View file

@ -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>())

View file

@ -1,5 +1,4 @@
{
"dom_webxr_test": true,
"gfx_text_antialiasing_enabled": false,
"network_tls_ignore_unexpected_eof": true
"gfx_text_antialiasing_enabled": false
}