NetworkPkg:Add a new error status code EFI_HTTP_ERROR
v4: * Update macro HTTP_ERROR_STATUS to HTTP_ERROR_OR_NOT_SUPPORT_STATUS_CODE Update copyright year. When the Error Status of ResponseData returned from HttpIoRecvResponse function during the Http HEAD method, it should also return error status to Load file protocol. Add a new error status code EFI_HTTP_ERROR in corresponding with the UEFI 2.6 spec . When a HTTP error occurred during the network operation, The EFI_HTTP_ERROR is returned in token. Cc: Fu Siyuan <siyuan.fu@intel.com> Cc: Ye Ting <ting.ye@intel.com> Cc: Wu Jiaxin <jiaxin.wu@intel.com> Contributed-under: TianoCore Contribution Agreement 1.0 Signed-off-by: Zhang Lubo <lubo.zhang@intel.com> Reviewed-by: Siyuan Fu <siyuan.fu@intel.com> Reviewed-by: Ye Ting <ting.ye@intel.com> Reviewed-by: Jiaxin Wu <jiaxin.wu@intel.com>
This commit is contained in:
@ -1,7 +1,7 @@
|
||||
/** @file
|
||||
Implementation of the boot file download function.
|
||||
|
||||
Copyright (c) 2015, Intel Corporation. All rights reserved.<BR>
|
||||
Copyright (c) 2015 - 2016, Intel Corporation. All rights reserved.<BR>
|
||||
This program and the accompanying materials are licensed and made available under
|
||||
the terms and conditions of the BSD License that accompanies this distribution.
|
||||
The full text of the license may be found at
|
||||
@ -717,6 +717,7 @@ HttpBootGetBootFile (
|
||||
)
|
||||
{
|
||||
EFI_STATUS Status;
|
||||
EFI_HTTP_STATUS_CODE StatusCode;
|
||||
CHAR8 *HostName;
|
||||
EFI_HTTP_REQUEST_DATA *RequestData;
|
||||
HTTP_IO_RESPONSE_DATA *ResponseData;
|
||||
@ -894,7 +895,12 @@ HttpBootGetBootFile (
|
||||
TRUE,
|
||||
ResponseData
|
||||
);
|
||||
if (EFI_ERROR (Status)) {
|
||||
if (EFI_ERROR (Status) || EFI_ERROR (ResponseData->Status)) {
|
||||
if (EFI_ERROR (ResponseData->Status)) {
|
||||
StatusCode = HttpIo->RspToken.Message->Data.Response->StatusCode;
|
||||
HttpBootPrintErrorMessage (StatusCode);
|
||||
Status = ResponseData->Status;
|
||||
}
|
||||
goto ERROR_5;
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user