From: "Ye, Ting" <ting.ye@intel.com>
To: "Wu, Jiaxin" <jiaxin.wu@intel.com>,
"edk2-devel@lists.01.org" <edk2-devel@lists.01.org>
Cc: "Fu, Siyuan" <siyuan.fu@intel.com>
Subject: Re: [Patch] NetworkPkg/HttpDxe: Support HTTP Patch method
Date: Thu, 3 Aug 2017 08:39:50 +0000 [thread overview]
Message-ID: <BC0C045B0E2A584CA4575E779FA2C12A1A916B1D@SHSMSX103.ccr.corp.intel.com> (raw)
In-Reply-To: <1501660861-11492-1-git-send-email-jiaxin.wu@intel.com>
Reviewed-by: Ye Ting <ting.ye@intel.com>
-----Original Message-----
From: Wu, Jiaxin
Sent: Wednesday, August 02, 2017 4:01 PM
To: edk2-devel@lists.01.org
Cc: Ye, Ting <ting.ye@intel.com>; Fu, Siyuan <siyuan.fu@intel.com>; Wu, Jiaxin <jiaxin.wu@intel.com>
Subject: [Patch] NetworkPkg/HttpDxe: Support HTTP Patch method
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 | 17 ++++++++++-------
1 file changed, 10 insertions(+), 7 deletions(-)
diff --git a/NetworkPkg/HttpDxe/HttpImpl.c b/NetworkPkg/HttpDxe/HttpImpl.c index 8a9e573..e0fecac 100644
--- a/NetworkPkg/HttpDxe/HttpImpl.c
+++ b/NetworkPkg/HttpDxe/HttpImpl.c
@@ -274,14 +274,15 @@ 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;
}
HttpInstance = HTTP_INSTANCE_FROM_PROTOCOL (This);
ASSERT (HttpInstance != NULL);
@@ -297,18 +298,20 @@ EfiHttpRequest (
return EFI_NOT_STARTED;
}
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;
}
@@ -615,11 +618,11 @@ EfiHttpRequest (
ASSERT (RequestMsg != NULL);
//
// 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.
//
if (Request != NULL) {
Status = NetMapInsertTail (&HttpInstance->TxTokens, Token, Wrap); @@ -1111,11 +1114,11 @@ HttpResponseWorker (
Status = EFI_NOT_READY;
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.
// Hence, check that case before doing a NetMapRemoveHead.
//
--
1.9.5.msysgit.1
prev parent reply other threads:[~2017-08-03 8:37 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2017-08-02 8:01 [Patch] NetworkPkg/HttpDxe: Support HTTP Patch method Jiaxin Wu
2017-08-02 8:04 ` Fu, Siyuan
2017-08-03 8:39 ` Ye, Ting [this message]
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-list from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=BC0C045B0E2A584CA4575E779FA2C12A1A916B1D@SHSMSX103.ccr.corp.intel.com \
--to=devel@edk2.groups.io \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox