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

LibWeb: Correctly categorize Fetch responses as network errors

The condition here is flipped. From the spec:

     A network error is a response whose ... body is null ...
This commit is contained in:
Timothy Flynn 2024-01-18 16:34:16 -05:00 committed by Andreas Kling
parent b317620486
commit 2b22402c6a
3 changed files with 39 additions and 1 deletions

View file

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