From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mga02.intel.com (mga02.intel.com [134.134.136.20]) (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 793642095DB90 for ; Tue, 8 Aug 2017 19:33:19 -0700 (PDT) Received: from fmsmga005.fm.intel.com ([10.253.24.32]) by orsmga101.jf.intel.com with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384; 08 Aug 2017 19:35:36 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.41,346,1498546800"; d="scan'208";a="137337262" Received: from jiaxinwu-mobl2.ccr.corp.intel.com ([10.239.196.134]) by fmsmga005.fm.intel.com with ESMTP; 08 Aug 2017 19:35:35 -0700 From: Jiaxin Wu To: edk2-devel@lists.01.org Cc: Ye Ting , Jin Eric , Wu Jiaxin Date: Wed, 9 Aug 2017 10:35:34 +0800 Message-Id: <1502246134-2172-1-git-send-email-jiaxin.wu@intel.com> X-Mailer: git-send-email 1.9.5.msysgit.1 Subject: [Patch] NetworkPkg/HttpDxe: Handle the HttpVersionUnsupported in the HttpConfigData X-BeenThere: edk2-devel@lists.01.org X-Mailman-Version: 2.1.22 Precedence: list List-Id: EDK II Development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 09 Aug 2017 02:33:19 -0000 Cc: Ye Ting Cc: Jin Eric Contributed-under: TianoCore Contribution Agreement 1.0 Signed-off-by: Wu Jiaxin --- NetworkPkg/HttpDxe/HttpImpl.c | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/NetworkPkg/HttpDxe/HttpImpl.c b/NetworkPkg/HttpDxe/HttpImpl.c index e0fecac..442397c 100644 --- a/NetworkPkg/HttpDxe/HttpImpl.c +++ b/NetworkPkg/HttpDxe/HttpImpl.c @@ -149,10 +149,14 @@ EfiHttpConfigure ( HttpInstance = HTTP_INSTANCE_FROM_PROTOCOL (This); ASSERT (HttpInstance != NULL && HttpInstance->Service != NULL); if (HttpConfigData != NULL) { + if (HttpConfigData->HttpVersion == HttpVersionUnsupported) { + return EFI_UNSUPPORTED; + } + // // Now configure this HTTP instance. // if (HttpInstance->State != HTTP_STATE_UNCONFIGED) { return EFI_ALREADY_STARTED; -- 1.9.5.msysgit.1