From nobody Sun May 11 01:51:21 2025 Delivered-To: importer@patchew.org Authentication-Results: mx.zohomail.com; spf=none (zoho.com: 198.145.21.10 is neither permitted nor denied by domain of lists.01.org) smtp.mailfrom=edk2-devel-bounces@lists.01.org Return-Path: Received: from ml01.01.org (ml01.01.org [198.145.21.10]) by mx.zohomail.com with SMTPS id 1513839057060822.25044110869; Wed, 20 Dec 2017 22:50:57 -0800 (PST) Received: from [127.0.0.1] (localhost [IPv6:::1]) by ml01.01.org (Postfix) with ESMTP id EEE03222447C3; Wed, 20 Dec 2017 22:46:05 -0800 (PST) Received: from mga11.intel.com (mga11.intel.com [192.55.52.93]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ml01.01.org (Postfix) with ESMTPS id 5A3092219BC89 for ; Wed, 20 Dec 2017 22:46:04 -0800 (PST) Received: from fmsmga007.fm.intel.com ([10.253.24.52]) by fmsmga102.fm.intel.com with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384; 20 Dec 2017 22:50:52 -0800 Received: from jiaxinwu-mobl2.ccr.corp.intel.com ([10.239.196.141]) by fmsmga007.fm.intel.com with ESMTP; 20 Dec 2017 22:50:51 -0800 X-Original-To: edk2-devel@lists.01.org Received-SPF: none (zoho.com: 198.145.21.10 is neither permitted nor denied by domain of lists.01.org) client-ip=198.145.21.10; envelope-from=edk2-devel-bounces@lists.01.org; helo=ml01.01.org; Received-SPF: Pass (sender SPF authorized) identity=mailfrom; client-ip=192.55.52.93; helo=mga11.intel.com; envelope-from=jiaxin.wu@intel.com; receiver=edk2-devel@lists.01.org X-Amp-Result: SKIPPED(no attachment in message) X-Amp-File-Uploaded: False X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.45,434,1508828400"; d="scan'208";a="4074953" From: Jiaxin Wu To: edk2-devel@lists.01.org Date: Thu, 21 Dec 2017 14:50:47 +0800 Message-Id: <1513839047-15032-3-git-send-email-jiaxin.wu@intel.com> X-Mailer: git-send-email 1.9.5.msysgit.1 In-Reply-To: <1513839047-15032-1-git-send-email-jiaxin.wu@intel.com> References: <1513839047-15032-1-git-send-email-jiaxin.wu@intel.com> Subject: [edk2] [Patch 2/2] NetworkPkg/HttpBootDxe: Break the HttpBoot Callback function when meet redirect status. X-BeenThere: edk2-devel@lists.01.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: EDK II Development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Ye Ting , Wang Fan , Fu Siyuan , Wu Jiaxin MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable Errors-To: edk2-devel-bounces@lists.01.org Sender: "edk2-devel" X-ZohoMail: RSF_4 Z_629925259 SPT_0 Content-Type: text/plain; charset="utf-8" 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 Cc: Ye Ting Cc: Fu Siyuan Contributed-under: TianoCore Contribution Agreement 1.0 Signed-off-by: Wu Jiaxin --- 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 !=3D NULL) { Print (L"\n HTTP ERROR: Resource Redirected.\n New Location:= %a\n", HttpHeader->FieldValue); } + break;=20 } } =20 HttpHeader =3D HttpFindHeader ( HttpMessage->HeaderCount, --=20 1.9.5.msysgit.1 _______________________________________________ edk2-devel mailing list edk2-devel@lists.01.org https://lists.01.org/mailman/listinfo/edk2-devel