summaryrefslogtreecommitdiffstats
path: root/NetworkPkg/HttpBootDxe/HttpBootSupport.c
diff options
context:
space:
mode:
authorZhang Lubo <lubo.zhang@intel.com>2016-01-29 11:17:34 +0800
committerJiaxin Wu <jiaxin.wu@intel.com>2016-02-03 11:48:36 +0800
commit072289f45c7ac13e6f70ba4ad739e95086e5d2d2 (patch)
treebf90d3afaf7c4d06cd801d31f5e06cfea092f658 /NetworkPkg/HttpBootDxe/HttpBootSupport.c
parent10a3840ff9edbe7038ced76c551bffd087dc4387 (diff)
downloadedk2-072289f45c7ac13e6f70ba4ad739e95086e5d2d2.tar.gz
edk2-072289f45c7ac13e6f70ba4ad739e95086e5d2d2.tar.bz2
edk2-072289f45c7ac13e6f70ba4ad739e95086e5d2d2.zip
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>
Diffstat (limited to 'NetworkPkg/HttpBootDxe/HttpBootSupport.c')
-rw-r--r--NetworkPkg/HttpBootDxe/HttpBootSupport.c18
1 files changed, 5 insertions, 13 deletions
diff --git a/NetworkPkg/HttpBootDxe/HttpBootSupport.c b/NetworkPkg/HttpBootDxe/HttpBootSupport.c
index f9bbe4b1a0..db2af780a1 100644
--- a/NetworkPkg/HttpBootDxe/HttpBootSupport.c
+++ b/NetworkPkg/HttpBootDxe/HttpBootSupport.c
@@ -1,7 +1,7 @@
/** @file
Support functions implementation for UEFI HTTP boot driver.
-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
@@ -930,7 +930,6 @@ HttpIoRecvResponse (
{
EFI_STATUS Status;
EFI_HTTP_PROTOCOL *Http;
- EFI_HTTP_STATUS_CODE StatusCode;
if (HttpIo == NULL || HttpIo->Http == NULL || ResponseData == NULL) {
return EFI_INVALID_PARAMETER;
@@ -971,17 +970,10 @@ HttpIoRecvResponse (
//
// Store the received data into the wrapper.
//
- Status = HttpIo->RspToken.Status;
- if (!EFI_ERROR (Status)) {
- ResponseData->HeaderCount = HttpIo->RspToken.Message->HeaderCount;
- ResponseData->Headers = HttpIo->RspToken.Message->Headers;
- ResponseData->BodyLength = HttpIo->RspToken.Message->BodyLength;
- }
-
- if (RecvMsgHeader) {
- StatusCode = HttpIo->RspToken.Message->Data.Response->StatusCode;
- HttpBootPrintErrorMessage (StatusCode);
- }
+ ResponseData->Status = HttpIo->RspToken.Status;
+ ResponseData->HeaderCount = HttpIo->RspToken.Message->HeaderCount;
+ ResponseData->Headers = HttpIo->RspToken.Message->Headers;
+ ResponseData->BodyLength = HttpIo->RspToken.Message->BodyLength;
return Status;
}