]> git.proxmox.com Git - mirror_edk2.git/commitdiff
NetworkPkg/HttpBootDxe: Break the HttpBoot Callback function when meet redirect status.
authorJiaxin Wu <jiaxin.wu@intel.com>
Thu, 21 Dec 2017 06:34:58 +0000 (14:34 +0800)
committerJiaxin Wu <jiaxin.wu@intel.com>
Fri, 22 Dec 2017 07:51:14 +0000 (15:51 +0800)
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>
Reviewed-by: Wang Fan <fan.wang@intel.com>
NetworkPkg/HttpBootDxe/HttpBootImpl.c

index d4b46a6e4a0bac6315bea073cc5e2392ce713973..16c1207bf8b1ab52c50f261c60e0963ac742fadb 100644 (file)
@@ -711,6 +711,7 @@ HttpBootCallback (
           if (HttpHeader != NULL) {\r
             Print (L"\n  HTTP ERROR: Resource Redirected.\n  New Location: %a\n", HttpHeader->FieldValue);\r
           }\r
+          break; \r
         }\r
       }\r
       \r