summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--NetworkPkg/HttpDxe/HttpImpl.c17
1 files changed, 10 insertions, 7 deletions
diff --git a/NetworkPkg/HttpDxe/HttpImpl.c b/NetworkPkg/HttpDxe/HttpImpl.c
index 8a9e57345a..e0fecac3d5 100644
--- a/NetworkPkg/HttpDxe/HttpImpl.c
+++ b/NetworkPkg/HttpDxe/HttpImpl.c
@@ -276,10 +276,11 @@ EfiHttpRequest (
Request = HttpMsg->Data.Request;
//
- // Only support GET, HEAD, PUT and POST method in current implementation.
+ // Only support GET, HEAD, PATCH, PUT and POST method in current implementation.
//
if ((Request != NULL) && (Request->Method != HttpMethodGet) &&
- (Request->Method != HttpMethodHead) && (Request->Method != HttpMethodPut) && (Request->Method != HttpMethodPost)) {
+ (Request->Method != HttpMethodHead) && (Request->Method != HttpMethodPut) &&
+ (Request->Method != HttpMethodPost) && (Request->Method != HttpMethodPatch)) {
return EFI_UNSUPPORTED;
}
@@ -299,14 +300,16 @@ EfiHttpRequest (
if (Request == NULL) {
//
- // Request would be NULL only for PUT/POST operation (in the current implementation)
+ // Request would be NULL only for PUT/POST/PATCH operation (in the current implementation)
//
- if ((HttpInstance->Method != HttpMethodPut) && (HttpInstance->Method != HttpMethodPost)) {
+ if ((HttpInstance->Method != HttpMethodPut) &&
+ (HttpInstance->Method != HttpMethodPost) &&
+ (HttpInstance->Method != HttpMethodPatch)) {
return EFI_INVALID_PARAMETER;
}
//
- // For PUT/POST, we need to have the TCP already configured. Bail out if it is not!
+ // For PUT/POST/PATCH, we need to have the TCP already configured. Bail out if it is not!
//
if (HttpInstance->State < HTTP_STATE_TCP_CONFIGED) {
return EFI_INVALID_PARAMETER;
@@ -617,7 +620,7 @@ EfiHttpRequest (
//
// Every request we insert a TxToken and a response call would remove the TxToken.
- // In cases of PUT/POST, after an initial request-response pair, we would do a
+ // In cases of PUT/POST/PATCH, after an initial request-response pair, we would do a
// continuous request without a response call. So, in such cases, where Request
// structure is NULL, we would not insert a TxToken.
//
@@ -1113,7 +1116,7 @@ HttpResponseWorker (
ValueInItem = NULL;
//
- // In cases of PUT/POST, after an initial request-response pair, we would do a
+ // In cases of PUT/POST/PATCH, after an initial request-response pair, we would do a
// continuous request without a response call. So, we would not do an insert of
// TxToken. After we have sent the complete file, we will call a response to get
// a final response from server. In such a case, we would not have any TxTokens.