/** @file\r
Implementation of EFI_HTTP_PROTOCOL protocol interfaces.\r
\r
- Copyright (c) 2015 - 2017, Intel Corporation. All rights reserved.<BR>\r
+ Copyright (c) 2015 - 2018, Intel Corporation. All rights reserved.<BR>\r
(C) Copyright 2015-2016 Hewlett Packard Enterprise Development LP<BR>\r
\r
This program and the accompanying materials\r
}\r
\r
HttpInstance = HTTP_INSTANCE_FROM_PROTOCOL (This);\r
- ASSERT (HttpInstance != NULL);\r
\r
if ((HttpConfigData->AccessPoint.IPv6Node == NULL) ||\r
(HttpConfigData->AccessPoint.IPv4Node == NULL)) {\r
}\r
\r
HttpInstance = HTTP_INSTANCE_FROM_PROTOCOL (This);\r
- ASSERT (HttpInstance != NULL && HttpInstance->Service != NULL);\r
+ ASSERT (HttpInstance->Service != NULL);\r
\r
if (HttpConfigData != NULL) {\r
\r
Request = HttpMsg->Data.Request;\r
\r
//\r
- // Only support GET, HEAD, PATCH, PUT and POST method in current implementation.\r
+ // Only support GET, HEAD, DELETE, PATCH, PUT and POST method in current implementation.\r
//\r
if ((Request != NULL) && (Request->Method != HttpMethodGet) &&\r
- (Request->Method != HttpMethodHead) && (Request->Method != HttpMethodPut) && \r
- (Request->Method != HttpMethodPost) && (Request->Method != HttpMethodPatch)) {\r
+ (Request->Method != HttpMethodHead) && (Request->Method != HttpMethodDelete) && \r
+ (Request->Method != HttpMethodPut) && (Request->Method != HttpMethodPost) && \r
+ (Request->Method != HttpMethodPatch)) {\r
return EFI_UNSUPPORTED;\r
}\r
\r
HttpInstance = HTTP_INSTANCE_FROM_PROTOCOL (This);\r
- ASSERT (HttpInstance != NULL);\r
\r
//\r
// Capture the method into HttpInstance.\r
\r
FreePool (HostName);\r
\r
+ HttpUrlFreeParser (UrlParser);\r
+\r
//\r
// Queue the HTTP token and return.\r
//\r
\r
FreePool (HostNameStr);\r
if (EFI_ERROR (Status)) {\r
+ DEBUG ((EFI_D_ERROR, "Error: Could not retrieve the host address from DNS server.\n"));\r
goto Error1;\r
}\r
}\r
goto Error3;\r
}\r
\r
- ASSERT (RequestMsg != NULL);\r
-\r
//\r
// Every request we insert a TxToken and a response call would remove the TxToken.\r
// In cases of PUT/POST/PATCH, after an initial request-response pair, we would do a\r
if (HostName != NULL) {\r
FreePool (HostName);\r
}\r
+\r
+ if (UrlParser != NULL) {\r
+ HttpUrlFreeParser (UrlParser);\r
+ }\r
\r
return EFI_SUCCESS;\r
\r
if (Wrap != NULL) {\r
FreePool (Wrap);\r
}\r
- if (UrlParser!= NULL) {\r
+ if (UrlParser != NULL) {\r
HttpUrlFreeParser (UrlParser);\r
}\r
\r
}\r
\r
HttpInstance = HTTP_INSTANCE_FROM_PROTOCOL (This);\r
- ASSERT (HttpInstance != NULL);\r
\r
if (HttpInstance->State != HTTP_STATE_TCP_CONNECTED) {\r
return EFI_NOT_STARTED;\r
}\r
\r
HttpInstance = HTTP_INSTANCE_FROM_PROTOCOL (This);\r
- ASSERT (HttpInstance != NULL);\r
\r
if (HttpInstance->State != HTTP_STATE_TCP_CONNECTED) {\r
return EFI_NOT_STARTED;\r
}\r
\r
HttpInstance = HTTP_INSTANCE_FROM_PROTOCOL (This);\r
- ASSERT (HttpInstance != NULL);\r
\r
if (HttpInstance->State != HTTP_STATE_TCP_CONNECTED) {\r
return EFI_NOT_STARTED;\r