summaryrefslogtreecommitdiffstats
path: root/NetworkPkg/HttpDxe/HttpProto.c
diff options
context:
space:
mode:
authorJiaxin Wu <jiaxin.wu@intel.com>2015-08-26 06:19:53 +0000
committerjiaxinwu <jiaxinwu@Edk2>2015-08-26 06:19:53 +0000
commit5ca29abe529794c1c2a2663378b0719e902c1077 (patch)
tree452a83c617b23f442f9c149318e7e7cb664b9f34 /NetworkPkg/HttpDxe/HttpProto.c
parentd36e65a045787319fe26b1a8c0b48c536f236ed6 (diff)
downloadedk2-5ca29abe529794c1c2a2663378b0719e902c1077.tar.gz
edk2-5ca29abe529794c1c2a2663378b0719e902c1077.tar.bz2
edk2-5ca29abe529794c1c2a2663378b0719e902c1077.zip
NetworkPkg: Update HttpDxe driver to consume EFI_HTTP_UTILITIES_PROTOCOL
v2: * Register a notification function to be executed for Http utilities protocol in the drivers entry points. Since we add EFI_HTTP_UTILITIES_PROTOCOL support, HttpDxe driver should be updated to remove internal http utilities functions and consume this protocol directly. Cc: Ye Ting <ting.ye@intel.com> Cc: Siyuan Fu <siyuan.fu@intel.com> Cc: Samer El-Haj-Mahmoud <elhaj@hp.com> Contributed-under: TianoCore Contribution Agreement 1.0 Signed-off-by: Jiaxin Wu <jiaxin.wu@intel.com> Reviewed-by: Fu Siyuan <siyuan.fu@intel.com> git-svn-id: https://svn.code.sf.net/p/edk2/code/trunk/edk2@18316 6f19259b-4bc3-4df7-8a09-765794883524
Diffstat (limited to 'NetworkPkg/HttpDxe/HttpProto.c')
-rw-r--r--NetworkPkg/HttpDxe/HttpProto.c30
1 files changed, 19 insertions, 11 deletions
diff --git a/NetworkPkg/HttpDxe/HttpProto.c b/NetworkPkg/HttpDxe/HttpProto.c
index 50ade4c230..829758ad5e 100644
--- a/NetworkPkg/HttpDxe/HttpProto.c
+++ b/NetworkPkg/HttpDxe/HttpProto.c
@@ -1072,18 +1072,26 @@ HttpGenRequestString (
}
//
+ // Check whether the EFI_HTTP_UTILITIES_PROTOCOL is available.
+ //
+ if (mHttpUtilities == NULL) {
+ return NULL;
+ }
+
+ //
// Build raw unformatted HTTP headers.
- //
- Status = HttpUtilitiesBuild (
- 0,
- NULL,
- 0,
- NULL,
- Message->HeaderCount,
- AppendList,
- &HttpHdrSize,
- &HttpHdr
- );
+ //
+ Status = mHttpUtilities->Build (
+ mHttpUtilities,
+ 0,
+ NULL,
+ 0,
+ NULL,
+ Message->HeaderCount,
+ AppendList,
+ &HttpHdrSize,
+ &HttpHdr
+ );
FreePool (AppendList);
if (EFI_ERROR (Status) || HttpHdr == NULL) {
return NULL;