diff options
author | Ghazi Belaam <Ghazi.belaam@hpe.com> | 2016-03-05 06:07:50 +0800 |
---|---|---|
committer | Fu Siyuan <siyuan.fu@intel.com> | 2016-03-10 10:01:42 +0800 |
commit | f58554fc3f3eaf0ca132d0880ec05fbee4b36edf (patch) | |
tree | 4fe697144433948976ec4f19760404583ca1cebb /NetworkPkg/HttpBootDxe | |
parent | 558b99a6a31ac883539779ffc112c64ada32aaee (diff) | |
download | edk2-platforms-f58554fc3f3eaf0ca132d0880ec05fbee4b36edf.tar.xz |
NetworkPkg: Use the New Functions from HttpLib
After submitting changes for HttpLib, other modules should be able to use
those functions
1 remove the private function and their calls
2 update it with the functions from httpLib
Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: Ghazi Belaam <Ghazi.belaam@hpe.com>
Reviewed-by: Fu Siyuan <siyuan.fu@intel.com>
Reviewed-by: Samer EL-Haj-Mahmoud <elhaj@hpe.com>
Reviewed-by: Jiaxin Wu <jiaxin.wu@intel.com>
Diffstat (limited to 'NetworkPkg/HttpBootDxe')
-rw-r--r-- | NetworkPkg/HttpBootDxe/HttpBootSupport.c | 43 |
1 files changed, 5 insertions, 38 deletions
diff --git a/NetworkPkg/HttpBootDxe/HttpBootSupport.c b/NetworkPkg/HttpBootDxe/HttpBootSupport.c index f30d9f7fb0..e678379bf4 100644 --- a/NetworkPkg/HttpBootDxe/HttpBootSupport.c +++ b/NetworkPkg/HttpBootDxe/HttpBootSupport.c @@ -2,8 +2,9 @@ Support functions implementation for UEFI HTTP boot driver.
Copyright (c) 2015 - 2016, Intel Corporation. All rights reserved.<BR>
-This program and the accompanying materials are licensed and made available under
-the terms and conditions of the BSD License that accompanies this distribution.
+(C) Copyright 2016 Hewlett Packard Enterprise Development LP<BR>
+This program and the accompanying materials are licensed and made available under
+the terms and conditions of the BSD License that accompanies this distribution.
The full text of the license may be found at
http://opensource.org/licenses/bsd-license.php.
@@ -548,44 +549,10 @@ HttpBootFreeHeader ( }
/**
- Find a specified header field according to the field name.
-
- @param[in] HeaderCount Number of HTTP header structures in Headers list.
- @param[in] Headers Array containing list of HTTP headers.
- @param[in] FieldName Null terminated string which describes a field name.
-
- @return Pointer to the found header or NULL.
-
-**/
-EFI_HTTP_HEADER *
-HttpBootFindHeader (
- IN UINTN HeaderCount,
- IN EFI_HTTP_HEADER *Headers,
- IN CHAR8 *FieldName
- )
-{
- UINTN Index;
-
- if (HeaderCount == 0 || Headers == NULL || FieldName == NULL) {
- return NULL;
- }
-
- for (Index = 0; Index < HeaderCount; Index++){
- //
- // Field names are case-insensitive (RFC 2616).
- //
- if (AsciiStriCmp (Headers[Index].FieldName, FieldName) == 0) {
- return &Headers[Index];
- }
- }
- return NULL;
-}
-
-/**
Set or update a HTTP header with the field name and corresponding value.
@param[in] HttpIoHeader Point to the HTTP header holder.
- @param[in] FieldName Null terminated string which describes a field name.
+ @param[in] FieldName Null terminated string which describes a field name.
@param[in] FieldValue Null terminated string which describes the corresponding field value.
@retval EFI_SUCCESS The HTTP header has been set or updated.
@@ -609,7 +576,7 @@ HttpBootSetHeader ( return EFI_INVALID_PARAMETER;
}
- Header = HttpBootFindHeader (HttpIoHeader->HeaderCount, HttpIoHeader->Headers, FieldName);
+ Header = HttpFindHeader (HttpIoHeader->HeaderCount, HttpIoHeader->Headers, FieldName);
if (Header == NULL) {
//
// Add a new header.
|