/** @file\r
Implementation of EFI_HTTP_PROTOCOL protocol interfaces.\r
\r
- Copyright (c) 2015 - 2016, Intel Corporation. All rights reserved.<BR>\r
+ Copyright (c) 2015 - 2017, Intel Corporation. All rights reserved.<BR>\r
(C) Copyright 2015-2016 Hewlett Packard Enterprise Development LP<BR>\r
\r
This program and the accompanying materials\r
//\r
HttpInstance->UseHttps = IsHttpsUrl (Url);\r
\r
+ //\r
+ // HTTP is disabled, return directly if the URI is not HTTPS.\r
+ //\r
+ if (!PcdGetBool (PcdAllowHttpConnections) && !(HttpInstance->UseHttps)) {\r
+ \r
+ DEBUG ((EFI_D_ERROR, "EfiHttpRequest: HTTP is disabled.\n"));\r
+\r
+ return EFI_ACCESS_DENIED;\r
+ }\r
+\r
//\r
// Check whether we need to create Tls child and open the TLS protocol.\r
//\r