]> git.proxmox.com Git - mirror_edk2.git/blobdiff - NetworkPkg/HttpBootDxe/HttpBootSupport.c
NetworkPkg: Use the New Functions from HttpLib
[mirror_edk2.git] / NetworkPkg / HttpBootDxe / HttpBootSupport.c
index f30d9f7fb0db7475f2293ac6cb4f4d48219dae94..e678379bf48bb96f041e97882d8c6db5a582648d 100644 (file)
@@ -2,8 +2,9 @@
   Support functions implementation for UEFI HTTP boot driver.\r
 \r
 Copyright (c) 2015 - 2016, Intel Corporation. All rights reserved.<BR>\r
-This program and the accompanying materials are licensed and made available under \r
-the terms and conditions of the BSD License that accompanies this distribution.  \r
+(C) Copyright 2016 Hewlett Packard Enterprise Development LP<BR>\r
+This program and the accompanying materials are licensed and made available under\r
+the terms and conditions of the BSD License that accompanies this distribution.\r
 The full text of the license may be found at\r
 http://opensource.org/licenses/bsd-license.php.                                          \r
     \r
@@ -547,45 +548,11 @@ HttpBootFreeHeader (
   }\r
 }\r
 \r
-/**\r
-  Find a specified header field according to the field name.\r
-\r
-  @param[in]   HeaderCount      Number of HTTP header structures in Headers list. \r
-  @param[in]   Headers          Array containing list of HTTP headers.\r
-  @param[in]   FieldName        Null terminated string which describes a field name. \r
-\r
-  @return    Pointer to the found header or NULL.\r
-\r
-**/\r
-EFI_HTTP_HEADER *\r
-HttpBootFindHeader (\r
-  IN  UINTN                HeaderCount,\r
-  IN  EFI_HTTP_HEADER      *Headers,\r
-  IN  CHAR8                *FieldName\r
-  )\r
-{\r
-  UINTN                 Index;\r
-  \r
-  if (HeaderCount == 0 || Headers == NULL || FieldName == NULL) {\r
-    return NULL;\r
-  }\r
-\r
-  for (Index = 0; Index < HeaderCount; Index++){\r
-    //\r
-    // Field names are case-insensitive (RFC 2616).\r
-    //\r
-    if (AsciiStriCmp (Headers[Index].FieldName, FieldName) == 0) {\r
-      return &Headers[Index];\r
-    }\r
-  }\r
-  return NULL;\r
-}\r
-\r
 /**\r
   Set or update a HTTP header with the field name and corresponding value.\r
 \r
   @param[in]  HttpIoHeader       Point to the HTTP header holder.\r
-  @param[in]  FieldName          Null terminated string which describes a field name. \r
+  @param[in]  FieldName          Null terminated string which describes a field name.\r
   @param[in]  FieldValue         Null terminated string which describes the corresponding field value.\r
 \r
   @retval  EFI_SUCCESS           The HTTP header has been set or updated.\r
@@ -609,7 +576,7 @@ HttpBootSetHeader (
     return EFI_INVALID_PARAMETER;\r
   }\r
 \r
-  Header = HttpBootFindHeader (HttpIoHeader->HeaderCount, HttpIoHeader->Headers, FieldName);\r
+  Header = HttpFindHeader (HttpIoHeader->HeaderCount, HttpIoHeader->Headers, FieldName);\r
   if (Header == NULL) {\r
     //\r
     // Add a new header.\r