\r
if (HttpConfigData != NULL) {\r
\r
+ if (HttpConfigData->HttpVersion >= HttpVersionUnsupported) {\r
+ return EFI_UNSUPPORTED;\r
+ }\r
+\r
//\r
// Now configure this HTTP instance.\r
//\r
Request = HttpMsg->Data.Request;\r
\r
//\r
- // Only support GET, HEAD, PUT and POST method in current implementation.\r
+ // Only support GET, HEAD, PATCH, PUT and POST method in current implementation.\r
//\r
if ((Request != NULL) && (Request->Method != HttpMethodGet) &&\r
- (Request->Method != HttpMethodHead) && (Request->Method != HttpMethodPut) && (Request->Method != HttpMethodPost)) {\r
+ (Request->Method != HttpMethodHead) && (Request->Method != HttpMethodPut) && \r
+ (Request->Method != HttpMethodPost) && (Request->Method != HttpMethodPatch)) {\r
return EFI_UNSUPPORTED;\r
}\r
\r
\r
if (Request == NULL) {\r
//\r
- // Request would be NULL only for PUT/POST operation (in the current implementation)\r
+ // Request would be NULL only for PUT/POST/PATCH operation (in the current implementation)\r
//\r
- if ((HttpInstance->Method != HttpMethodPut) && (HttpInstance->Method != HttpMethodPost)) {\r
+ if ((HttpInstance->Method != HttpMethodPut) && \r
+ (HttpInstance->Method != HttpMethodPost) && \r
+ (HttpInstance->Method != HttpMethodPatch)) {\r
return EFI_INVALID_PARAMETER;\r
}\r
\r
//\r
- // For PUT/POST, we need to have the TCP already configured. Bail out if it is not!\r
+ // For PUT/POST/PATCH, we need to have the TCP already configured. Bail out if it is not!\r
//\r
if (HttpInstance->State < HTTP_STATE_TCP_CONFIGED) {\r
return EFI_INVALID_PARAMETER;\r
\r
//\r
// Every request we insert a TxToken and a response call would remove the TxToken.\r
- // In cases of PUT/POST, after an initial request-response pair, we would do a\r
+ // In cases of PUT/POST/PATCH, after an initial request-response pair, we would do a\r
// continuous request without a response call. So, in such cases, where Request\r
// structure is NULL, we would not insert a TxToken.\r
//\r
ValueInItem = NULL;\r
\r
//\r
- // In cases of PUT/POST, after an initial request-response pair, we would do a\r
+ // In cases of PUT/POST/PATCH, after an initial request-response pair, we would do a\r
// continuous request without a response call. So, we would not do an insert of\r
// TxToken. After we have sent the complete file, we will call a response to get\r
// a final response from server. In such a case, we would not have any TxTokens.\r