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/HttpUtilitiesDxe/HttpUtilitiesProtocol.c | |
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/HttpUtilitiesDxe/HttpUtilitiesProtocol.c')
-rw-r--r-- | NetworkPkg/HttpUtilitiesDxe/HttpUtilitiesProtocol.c | 27 |
1 files changed, 14 insertions, 13 deletions
diff --git a/NetworkPkg/HttpUtilitiesDxe/HttpUtilitiesProtocol.c b/NetworkPkg/HttpUtilitiesDxe/HttpUtilitiesProtocol.c index a83c9633fc..739d3b753c 100644 --- a/NetworkPkg/HttpUtilitiesDxe/HttpUtilitiesProtocol.c +++ b/NetworkPkg/HttpUtilitiesDxe/HttpUtilitiesProtocol.c @@ -2,6 +2,7 @@ Implementation of EFI_HTTP_PROTOCOL protocol interfaces.
Copyright (c) 2015, Intel Corporation. All rights reserved.<BR>
+ (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
which accompanies this distribution. The full text of the license may be found at
@@ -122,8 +123,8 @@ HttpUtilitiesBuild ( //
// Check whether each SeedHeaderFields member is in DeleteList
//
- if (IsValidHttpHeader( DeleteList, DeleteCount, SeedHeaderFields[Index].FieldName)) {
- Status = SetFieldNameAndValue (
+ if (HttpIsValidHttpHeader( DeleteList, DeleteCount, SeedHeaderFields[Index].FieldName)) {
+ Status = HttpSetFieldNameAndValue (
&TempHeaderFields[TempFieldCount],
SeedHeaderFields[Index].FieldName,
SeedHeaderFields[Index].FieldValue
@@ -149,7 +150,7 @@ HttpUtilitiesBuild ( }
for (Index = 0; Index < TempFieldCount; Index++) {
- Status = SetFieldNameAndValue (
+ Status = HttpSetFieldNameAndValue (
&NewHeaderFields[Index],
TempHeaderFields[Index].FieldName,
TempHeaderFields[Index].FieldValue
@@ -162,9 +163,9 @@ HttpUtilitiesBuild ( NewFieldCount = TempFieldCount;
for (Index = 0; Index < AppendCount; Index++) {
- HttpHeader = FindHttpHeader (NewHeaderFields, NewFieldCount, AppendList[Index]->FieldName);
+ HttpHeader = HttpFindHeader (NewFieldCount, NewHeaderFields, AppendList[Index]->FieldName);
if (HttpHeader != NULL) {
- Status = SetFieldNameAndValue (
+ Status = HttpSetFieldNameAndValue (
HttpHeader,
AppendList[Index]->FieldName,
AppendList[Index]->FieldValue
@@ -173,7 +174,7 @@ HttpUtilitiesBuild ( goto ON_EXIT;
}
} else {
- Status = SetFieldNameAndValue (
+ Status = HttpSetFieldNameAndValue (
&NewHeaderFields[NewFieldCount],
AppendList[Index]->FieldName,
AppendList[Index]->FieldValue
@@ -251,15 +252,15 @@ HttpUtilitiesBuild ( //
ON_EXIT:
if (SeedHeaderFields != NULL) {
- FreeHeaderFields(SeedHeaderFields, SeedFieldCount);
+ HttpFreeHeaderFields(SeedHeaderFields, SeedFieldCount);
}
if (TempHeaderFields != NULL) {
- FreeHeaderFields(TempHeaderFields, TempFieldCount);
+ HttpFreeHeaderFields(TempHeaderFields, TempFieldCount);
}
if (NewHeaderFields != NULL) {
- FreeHeaderFields(NewHeaderFields, NewFieldCount);
+ HttpFreeHeaderFields(NewHeaderFields, NewFieldCount);
}
return Status;
@@ -332,7 +333,7 @@ HttpUtilitiesParse ( while (TRUE) {
FieldName = NULL;
FieldValue = NULL;
- NextToken = GetFieldNameAndValue (Token, &FieldName, &FieldValue);
+ NextToken = HttpGetFieldNameAndValue (Token, &FieldName, &FieldValue);
Token = NextToken;
if (FieldName == NULL || FieldValue == NULL) {
break;
@@ -365,16 +366,16 @@ HttpUtilitiesParse ( while (Index < *FieldCount) {
FieldName = NULL;
FieldValue = NULL;
- NextToken = GetFieldNameAndValue (Token, &FieldName, &FieldValue);
+ NextToken = HttpGetFieldNameAndValue (Token, &FieldName, &FieldValue);
Token = NextToken;
if (FieldName == NULL || FieldValue == NULL) {
break;
}
- Status = SetFieldNameAndValue (&(*HeaderFields)[Index], FieldName, FieldValue);
+ Status = HttpSetFieldNameAndValue (&(*HeaderFields)[Index], FieldName, FieldValue);
if (EFI_ERROR (Status)) {
*FieldCount = 0;
- FreeHeaderFields (*HeaderFields, Index);
+ HttpFreeHeaderFields (*HeaderFields, Index);
goto ON_EXIT;
}
|