diff --git a/Tests/LibWeb/Text/expected/video-failed-load.txt b/Tests/LibWeb/Text/expected/video-failed-load.txt new file mode 100644 index 0000000000..18af3d39d2 --- /dev/null +++ b/Tests/LibWeb/Text/expected/video-failed-load.txt @@ -0,0 +1,3 @@ +failed to load: "data:" +failed to load: "file:///i-do-no-exist-i-swear" +failed to load: "https://i-do-no-exist-i-swear.net.uk" diff --git a/Tests/LibWeb/Text/input/video-failed-load.html b/Tests/LibWeb/Text/input/video-failed-load.html new file mode 100644 index 0000000000..34c07971e6 --- /dev/null +++ b/Tests/LibWeb/Text/input/video-failed-load.html @@ -0,0 +1,35 @@ + + diff --git a/Userland/Libraries/LibWeb/Fetch/Infrastructure/HTTP/Responses.cpp b/Userland/Libraries/LibWeb/Fetch/Infrastructure/HTTP/Responses.cpp index f59c151827..9f576a0cff 100644 --- a/Userland/Libraries/LibWeb/Fetch/Infrastructure/HTTP/Responses.cpp +++ b/Userland/Libraries/LibWeb/Fetch/Infrastructure/HTTP/Responses.cpp @@ -96,7 +96,7 @@ bool Response::is_network_error() const return false; if (!header_list()->is_empty()) return false; - if (!body()) + if (body()) return false; if (body_info() != BodyInfo {}) return false;