]> git.proxmox.com Git - mirror_edk2.git/blobdiff - NetworkPkg/HttpDxe/HttpImpl.c
OvmfPkg/VirtioNetDxe: add helper VirtioNetUninitRing()
[mirror_edk2.git] / NetworkPkg / HttpDxe / HttpImpl.c
index 8a9e57345af8802f0e53b2db0ff380d92465cb2f..c104b614f35a04c5794ec49ca2a6ea73b4888a29 100644 (file)
@@ -151,6 +151,10 @@ EfiHttpConfigure (
 \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
@@ -276,10 +280,11 @@ EfiHttpRequest (
   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
@@ -299,14 +304,16 @@ EfiHttpRequest (
 \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
@@ -617,7 +624,7 @@ EfiHttpRequest (
 \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
@@ -1113,7 +1120,7 @@ HttpResponseWorker (
     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