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
}\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
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