From: Jiaxin Wu <jiaxin.wu@intel.com>
To: edk2-devel@lists.01.org
Cc: Wang Fan <fan.wang@intel.com>, Ye Ting <ting.ye@intel.com>,
Fu Siyuan <siyuan.fu@intel.com>, Wu Jiaxin <jiaxin.wu@intel.com>
Subject: [Patch 2/2] NetworkPkg/HttpBootDxe: Break the HttpBoot Callback function when meet redirect status.
Date: Thu, 21 Dec 2017 14:50:47 +0800 [thread overview]
Message-ID: <1513839047-15032-3-git-send-email-jiaxin.wu@intel.com> (raw)
In-Reply-To: <1513839047-15032-1-git-send-email-jiaxin.wu@intel.com>
In HttpBootCallback(), when data type is HttpBootHttpResponse, function may meet
the resource redirect error. In current implementation, function will still go
ahead to find header for HTTP_HEADER_CONTENT_LENGTH, this is not expected. Function
should break in redirect status error handling.
Cc: Wang Fan <fan.wang@intel.com>
Cc: Ye Ting <ting.ye@intel.com>
Cc: Fu Siyuan <siyuan.fu@intel.com>
Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: Wu Jiaxin <jiaxin.wu@intel.com>
---
NetworkPkg/HttpBootDxe/HttpBootImpl.c | 1 +
1 file changed, 1 insertion(+)
diff --git a/NetworkPkg/HttpBootDxe/HttpBootImpl.c b/NetworkPkg/HttpBootDxe/HttpBootImpl.c
index d4b46a6..16c1207 100644
--- a/NetworkPkg/HttpBootDxe/HttpBootImpl.c
+++ b/NetworkPkg/HttpBootDxe/HttpBootImpl.c
@@ -709,10 +709,11 @@ HttpBootCallback (
HTTP_HEADER_LOCATION
);
if (HttpHeader != NULL) {
Print (L"\n HTTP ERROR: Resource Redirected.\n New Location: %a\n", HttpHeader->FieldValue);
}
+ break;
}
}
HttpHeader = HttpFindHeader (
HttpMessage->HeaderCount,
--
1.9.5.msysgit.1
next prev parent reply other threads:[~2017-12-21 6:46 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2017-12-21 6:50 [Patch 0/2] Fix some issues in HttpBootDxe driver Jiaxin Wu
2017-12-21 6:50 ` [Patch 1/2] NetworkPkg/HttpBootDxe: Avoid the potential memory leak when eror happen Jiaxin Wu
2017-12-21 6:50 ` Jiaxin Wu [this message]
2017-12-22 7:39 ` [Patch 0/2] Fix some issues in HttpBootDxe driver Wang, Fan
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-list from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=1513839047-15032-3-git-send-email-jiaxin.wu@intel.com \
--to=devel@edk2.groups.io \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox