1
Fork 0
mirror of https://github.com/RGBCube/serenity synced 2025-05-31 10:48:11 +00:00

LibWeb: Don't treat any empty resources as errors

HTML, CSS, JS and text files (among other things) can all legitimately
be empty. Other types may be invalid, but that will be caught when
trying to parse it as a document, so this check can safely be removed.
This commit is contained in:
Sam Atkins 2022-05-13 15:57:04 +01:00 committed by Linus Groh
parent ffc5fed79f
commit f8950ea846

View file

@ -331,11 +331,6 @@ void FrameLoader::resource_did_load()
}
m_redirects_count = 0;
if (!resource()->has_encoded_data() && url.to_string() != "about:blank") {
load_error_page(url, "No data");
return;
}
if (resource()->has_encoding()) {
dbgln_if(RESOURCE_DEBUG, "This content has MIME type '{}', encoding '{}'", resource()->mime_type(), resource()->encoding().value());
} else {