From ad4b4046f4503a54b5762f97381cc7b8d90402fc Mon Sep 17 00:00:00 2001 From: Linus Groh Date: Fri, 3 Mar 2023 09:27:51 +0000 Subject: LibWeb/Fetch: Propagate OOM errors from HeaderList::extract_mime_type() --- Userland/Libraries/LibWeb/Fetch/Infrastructure/NoSniffBlocking.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'Userland/Libraries/LibWeb/Fetch/Infrastructure/NoSniffBlocking.cpp') diff --git a/Userland/Libraries/LibWeb/Fetch/Infrastructure/NoSniffBlocking.cpp b/Userland/Libraries/LibWeb/Fetch/Infrastructure/NoSniffBlocking.cpp index 1d762df730..23401c04fb 100644 --- a/Userland/Libraries/LibWeb/Fetch/Infrastructure/NoSniffBlocking.cpp +++ b/Userland/Libraries/LibWeb/Fetch/Infrastructure/NoSniffBlocking.cpp @@ -1,5 +1,5 @@ /* - * Copyright (c) 2022, Linus Groh + * Copyright (c) 2022-2023, Linus Groh * * SPDX-License-Identifier: BSD-2-Clause */ @@ -38,7 +38,7 @@ ErrorOr should_response_to_request_be_blocked_due_to_ return RequestOrResponseBlocking::Allowed; // 2. Let mimeType be the result of extracting a MIME type from response’s header list. - auto mime_type = response.header_list()->extract_mime_type(); + auto mime_type = TRY(response.header_list()->extract_mime_type()); // 3. Let destination be request’s destination. auto const& destination = request.destination(); -- cgit v1.2.3