]> git.proxmox.com Git - mirror_edk2.git/blobdiff - NetworkPkg/HttpBootDxe/HttpBootConfig.c
NetworkPkg: Allow user to create a HTTP corporate boot option in setup page.
[mirror_edk2.git] / NetworkPkg / HttpBootDxe / HttpBootConfig.c
index c47dddcee826d31dd79fa0f2453e609d5f35ebe9..00e4782f567416a5220a1b4d9f452f42984f6eab 100644 (file)
@@ -79,9 +79,9 @@ HttpBootAddBootOption (
   }\r
 \r
   //\r
-  // Only accept http and https URI.\r
+  // Only accept empty URI, or http and https URI.\r
   //\r
-  if ((StrnCmp (Uri, L"http://", 7) != 0) && (StrnCmp (Uri, L"https://", 7) != 0)) {\r
+  if ((StrLen (Uri) != 0) && (StrnCmp (Uri, L"http://", 7) != 0) && (StrnCmp (Uri, L"https://", 8) != 0)) {\r
     return EFI_INVALID_PARAMETER;\r
   }\r
   \r
@@ -577,9 +577,10 @@ HttpBootFormCallback (
     HiiSetString (CallbackInfo->RegisteredHandle, Value->string, Uri, NULL);\r
 \r
     //\r
-    // We only accept http and https, pop up a message box for unsupported URI.\r
+    // The URI should be either an empty string (for corporate environment) ,or http(s) for home environment.\r
+    // Pop up a message box for other unsupported URI.\r
     //\r
-    if ((StrnCmp (Uri, L"http://", 7) != 0) && (StrnCmp (Uri, L"https://", 7) != 0)) {\r
+    if ((StrLen (Uri) != 0) && (StrnCmp (Uri, L"http://", 7) != 0) && (StrnCmp (Uri, L"https://", 8) != 0)) {\r
       CreatePopUp (\r
         EFI_LIGHTGRAY | EFI_BACKGROUND_BLUE,\r
         &Key,\r