Skip to content

Commit

Permalink
httpboot: Convert 404 Not found error to EFI_NOT_FOUND
Browse files Browse the repository at this point in the history
This will result in falling back to the default second stage loader like
disk based lookups.
  • Loading branch information
dbnicholson committed Oct 3, 2024
1 parent 7e80343 commit 8cf8a2b
Showing 1 changed file with 8 additions and 1 deletion.
9 changes: 8 additions & 1 deletion httpboot.c
Original file line number Diff line number Diff line change
Expand Up @@ -565,7 +565,14 @@ receive_http_response(EFI_HTTP_PROTOCOL *http, VOID **buffer, UINT64 *buf_size)
if (http_status != HTTP_STATUS_200_OK) {
perror(L"HTTP Status Code: %d\n",
convert_http_status_code(http_status));
efi_status = EFI_ABORTED;
switch (http_status) {
case HTTP_STATUS_404_NOT_FOUND:
efi_status = EFI_NOT_FOUND;
break;
default:
efi_status = EFI_ABORTED;
break;
}
goto error;
}

Expand Down

0 comments on commit 8cf8a2b

Please sign in to comment.