[edk2] [Patch] NetworkPkg/HttpDxe: Support HTTP Delete Method.

Jiaxin Wu posted 1 patch 6 years, 1 month ago
Failed in applying to current master (apply log)
NetworkPkg/HttpDxe/HttpImpl.c | 9 +++++----
1 file changed, 5 insertions(+), 4 deletions(-)
[edk2] [Patch] NetworkPkg/HttpDxe: Support HTTP Delete Method.
Posted by Jiaxin Wu 6 years, 1 month ago
Per the request to support HttpMethodDelete:
https://bugzilla.tianocore.org/show_bug.cgi?id=879,
This patch is to enable the HTTP Delete Method.

Cc: Karunakar P <karunakarp@amiindia.co.in>
Cc: Ye Ting <ting.ye@intel.com>
Cc: Fu Siyuan <siyuan.fu@intel.com>
Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: Wu Jiaxin <jiaxin.wu@intel.com>
---
 NetworkPkg/HttpDxe/HttpImpl.c | 9 +++++----
 1 file changed, 5 insertions(+), 4 deletions(-)

diff --git a/NetworkPkg/HttpDxe/HttpImpl.c b/NetworkPkg/HttpDxe/HttpImpl.c
index b3a64cf516..a2af59674a 100644
--- a/NetworkPkg/HttpDxe/HttpImpl.c
+++ b/NetworkPkg/HttpDxe/HttpImpl.c
@@ -1,9 +1,9 @@
 /** @file
   Implementation of EFI_HTTP_PROTOCOL protocol interfaces.
 
-  Copyright (c) 2015 - 2017, Intel Corporation. All rights reserved.<BR>
+  Copyright (c) 2015 - 2018, Intel Corporation. All rights reserved.<BR>
   (C) Copyright 2015-2016 Hewlett Packard Enterprise Development LP<BR>
 
   This program and the accompanying materials
   are licensed and made available under the terms and conditions of the BSD License
   which accompanies this distribution.  The full text of the license may be found at
@@ -279,15 +279,16 @@ EfiHttpRequest (
   }
 
   Request = HttpMsg->Data.Request;
 
   //
-  // Only support GET, HEAD, PATCH, PUT and POST method in current implementation.
+  // Only support GET, HEAD, DELETE, 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 != HttpMethodPatch)) {
+      (Request->Method != HttpMethodHead) && (Request->Method != HttpMethodDelete) && 
+      (Request->Method != HttpMethodPut) && (Request->Method != HttpMethodPost) && 
+      (Request->Method != HttpMethodPatch)) {
     return EFI_UNSUPPORTED;
   }
 
   HttpInstance = HTTP_INSTANCE_FROM_PROTOCOL (This);
 
-- 
2.16.2.windows.1

_______________________________________________
edk2-devel mailing list
edk2-devel@lists.01.org
https://lists.01.org/mailman/listinfo/edk2-devel
Re: [edk2] [Patch] NetworkPkg/HttpDxe: Support HTTP Delete Method.
Posted by Fu, Siyuan 6 years, 1 month ago
Reviewed-by: Fu Siyuan <siyuan.fu@intel.com>

> -----Original Message-----
> From: Wu, Jiaxin
> Sent: Tuesday, February 27, 2018 11:53 AM
> To: edk2-devel@lists.01.org
> Cc: Karunakar P <karunakarp@amiindia.co.in>; Ye, Ting <ting.ye@intel.com>;
> Fu, Siyuan <siyuan.fu@intel.com>; Wu, Jiaxin <jiaxin.wu@intel.com>
> Subject: [Patch] NetworkPkg/HttpDxe: Support HTTP Delete Method.
> 
> Per the request to support HttpMethodDelete:
> https://bugzilla.tianocore.org/show_bug.cgi?id=879,
> This patch is to enable the HTTP Delete Method.
> 
> Cc: Karunakar P <karunakarp@amiindia.co.in>
> Cc: Ye Ting <ting.ye@intel.com>
> Cc: Fu Siyuan <siyuan.fu@intel.com>
> Contributed-under: TianoCore Contribution Agreement 1.0
> Signed-off-by: Wu Jiaxin <jiaxin.wu@intel.com>
> ---
>  NetworkPkg/HttpDxe/HttpImpl.c | 9 +++++----
>  1 file changed, 5 insertions(+), 4 deletions(-)
> 
> diff --git a/NetworkPkg/HttpDxe/HttpImpl.c b/NetworkPkg/HttpDxe/HttpImpl.c
> index b3a64cf516..a2af59674a 100644
> --- a/NetworkPkg/HttpDxe/HttpImpl.c
> +++ b/NetworkPkg/HttpDxe/HttpImpl.c
> @@ -1,9 +1,9 @@
>  /** @file
>    Implementation of EFI_HTTP_PROTOCOL protocol interfaces.
> 
> -  Copyright (c) 2015 - 2017, Intel Corporation. All rights reserved.<BR>
> +  Copyright (c) 2015 - 2018, Intel Corporation. All rights reserved.<BR>
>    (C) Copyright 2015-2016 Hewlett Packard Enterprise Development LP<BR>
> 
>    This program and the accompanying materials
>    are licensed and made available under the terms and conditions of the
> BSD License
>    which accompanies this distribution.  The full text of the license may
> be found at
> @@ -279,15 +279,16 @@ EfiHttpRequest (
>    }
> 
>    Request = HttpMsg->Data.Request;
> 
>    //
> -  // Only support GET, HEAD, PATCH, PUT and POST method in current
> implementation.
> +  // Only support GET, HEAD, DELETE, 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 !=
> HttpMethodPatch)) {
> +      (Request->Method != HttpMethodHead) && (Request->Method !=
> HttpMethodDelete) &&
> +      (Request->Method != HttpMethodPut) && (Request->Method !=
> HttpMethodPost) &&
> +      (Request->Method != HttpMethodPatch)) {
>      return EFI_UNSUPPORTED;
>    }
> 
>    HttpInstance = HTTP_INSTANCE_FROM_PROTOCOL (This);
> 
> --
> 2.16.2.windows.1

_______________________________________________
edk2-devel mailing list
edk2-devel@lists.01.org
https://lists.01.org/mailman/listinfo/edk2-devel