NetworkPkg/DxeHttpLib: Migrate HTTP header manipulation APIs
Move HTTP header manipulation functions to DxeHttpLib from HttpBootSupport.c. These general functions are used by both Http BOOT and RedfishLib (patches will be sent later). Signed-off-by: Abner Chang <abner.chang@hpe.com> Cc: Maciej Rabeda <maciej.rabeda@linux.intel.com> Cc: Jiaxin Wu <jiaxin.wu@intel.com> Cc: Siyuan Fu <siyuan.fu@intel.com> Cc: Fan Wang <fan.wang@intel.com> Cc: Jiewen Yao <jiewen.yao@intel.com> Cc: Nickle Wang <nickle.wang@hpe.com> Cc: Peter O'Hanley <peter.ohanley@hpe.com> Reviewed-by: Maciej Rabeda <maciej.rabeda@linux.intel.com>
This commit is contained in:
committed by
mergify[bot]
parent
536a3e6726
commit
40c4cd5421
@ -977,7 +977,7 @@ HttpBootGetBootFile (
|
||||
// Accept
|
||||
// User-Agent
|
||||
//
|
||||
HttpIoHeader = HttpBootCreateHeader (3);
|
||||
HttpIoHeader = HttpIoCreateHeader (3);
|
||||
if (HttpIoHeader == NULL) {
|
||||
Status = EFI_OUT_OF_RESOURCES;
|
||||
goto ERROR_2;
|
||||
@ -995,7 +995,7 @@ HttpBootGetBootFile (
|
||||
if (EFI_ERROR (Status)) {
|
||||
goto ERROR_3;
|
||||
}
|
||||
Status = HttpBootSetHeader (
|
||||
Status = HttpIoSetHeader (
|
||||
HttpIoHeader,
|
||||
HTTP_HEADER_HOST,
|
||||
HostName
|
||||
@ -1008,7 +1008,7 @@ HttpBootGetBootFile (
|
||||
//
|
||||
// Add HTTP header field 2: Accept
|
||||
//
|
||||
Status = HttpBootSetHeader (
|
||||
Status = HttpIoSetHeader (
|
||||
HttpIoHeader,
|
||||
HTTP_HEADER_ACCEPT,
|
||||
"*/*"
|
||||
@ -1020,7 +1020,7 @@ HttpBootGetBootFile (
|
||||
//
|
||||
// Add HTTP header field 3: User-Agent
|
||||
//
|
||||
Status = HttpBootSetHeader (
|
||||
Status = HttpIoSetHeader (
|
||||
HttpIoHeader,
|
||||
HTTP_HEADER_USER_AGENT,
|
||||
HTTP_USER_AGENT_EFI_HTTP_BOOT
|
||||
@ -1291,7 +1291,7 @@ ERROR_4:
|
||||
FreePool (RequestData);
|
||||
}
|
||||
ERROR_3:
|
||||
HttpBootFreeHeader (HttpIoHeader);
|
||||
HttpIoFreeHeader (HttpIoHeader);
|
||||
ERROR_2:
|
||||
if (Cache != NULL) {
|
||||
FreePool (Cache);
|
||||
|
Reference in New Issue
Block a user