summaryrefslogtreecommitdiff
path: root/NetworkPkg/HttpDxe/HttpImpl.c
diff options
context:
space:
mode:
Diffstat (limited to 'NetworkPkg/HttpDxe/HttpImpl.c')
-rw-r--r--NetworkPkg/HttpDxe/HttpImpl.c20
1 files changed, 18 insertions, 2 deletions
diff --git a/NetworkPkg/HttpDxe/HttpImpl.c b/NetworkPkg/HttpDxe/HttpImpl.c
index 80e8192..5b3c5d0 100644
--- a/NetworkPkg/HttpDxe/HttpImpl.c
+++ b/NetworkPkg/HttpDxe/HttpImpl.c
@@ -757,7 +757,8 @@ HttpBodyParserCallback (
@retval EFI_SUCCESS Allocation succeeded.
@retval EFI_OUT_OF_RESOURCES Failed to complete the opration due to lack of resources.
- @retval EFI_NOT_READY Can't find a corresponding TxToken.
+ @retval EFI_NOT_READY Can't find a corresponding TxToken or
+ the EFI_HTTP_UTILITIES_PROTOCOL is not available.
**/
EFI_STATUS
@@ -953,10 +954,25 @@ HttpResponseWorker (
CopyMem (HeaderTmp, Tmp, SizeofHeaders);
FreePool (HttpHeaders);
HttpHeaders = HeaderTmp;
+
+ //
+ // Check whether the EFI_HTTP_UTILITIES_PROTOCOL is available.
+ //
+ if (mHttpUtilities == NULL) {
+ Status = EFI_NOT_READY;
+ goto Error;
+ }
+
//
// Parse the HTTP header into array of key/value pairs.
//
- Status = HttpUtilitiesParse (HttpHeaders, SizeofHeaders, &HttpMsg->Headers, &HttpMsg->HeaderCount);
+ Status = mHttpUtilities->Parse (
+ mHttpUtilities,
+ HttpHeaders,
+ SizeofHeaders,
+ &HttpMsg->Headers,
+ &HttpMsg->HeaderCount
+ );
if (EFI_ERROR (Status)) {
goto Error;
}