grub-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [PATCH v1] http: return error on unhandled HTTP error responses


From: Daniel Kiper
Subject: Re: [PATCH v1] http: return error on unhandled HTTP error responses
Date: Wed, 25 Mar 2020 19:55:47 +0100
User-agent: NeoMutt/20170113 (1.7.2)

On Tue, Mar 17, 2020 at 07:56:14PM +0100, Olaf Hering wrote:
> A http transfer will hang if an unhandled error is returned.
> The error branch returns the value zero, which is not expected by the caller.
>
> Signed-off-by: Olaf Hering <address@hidden>
> ---
>  grub-core/net/http.c | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/grub-core/net/http.c b/grub-core/net/http.c
> index b616cf40b..9d92a4905 100644
> --- a/grub-core/net/http.c
> +++ b/grub-core/net/http.c
> @@ -125,7 +125,7 @@ parse_line (grub_file_t file, http_data_t data, char 
> *ptr, grub_size_t len)
>            valid answers like 403 will trigger this very generic message.  */
>         data->errmsg = grub_xasprintf (_("unsupported HTTP error %d: %s"),
>                                        code, ptr);
> -       return GRUB_ERR_NONE;
> +       return GRUB_ERR_FILE_READ_ERROR;

Should not we do the same for 404, file not found, a few lines above?

Daniel



reply via email to

[Prev in Thread] Current Thread [Next in Thread]