summaryrefslogtreecommitdiff
path: root/NetworkPkg/HttpDxe/HttpDriver.c
diff options
context:
space:
mode:
authorNagaraj Hegde <nagaraj-p.hegde@hpe.com>2016-05-06 18:20:00 +0800
committerFu Siyuan <siyuan.fu@intel.com>2016-05-16 14:22:33 +0800
commitd8293d31416242468323ef30c6fa2a5bf6267996 (patch)
tree1087d93ea337f900c8c4fdae71dd7de2da151b82 /NetworkPkg/HttpDxe/HttpDriver.c
parentbfba88bc68eed24c71ff500b740c3f563531d49c (diff)
downloadedk2-platforms-d8293d31416242468323ef30c6fa2a5bf6267996.tar.xz
NetworkPkg:HttpDxe: Code changes to support HTTP PUT/POST operations
Code changes enables HttpDxe to handle PUT/POST operations. EfiHttpRequest assumes "Request" and "HttpMsg->Headers" can never be NULL. Also, HttpResponseWorker assumes HTTP Reponse will contain headers. We could have response which could contain only a string (HTTP 100 Continue) and no headers. Code changes tries to do-away from these assumptions, which would enable HttpDxe to support PUT/POST operations. Contributed-under: TianoCore Contribution Agreement 1.0 Signed-off-by: Hegde, Nagaraj P nagaraj-p.hegde@hpe.com Reviewed-By: Wu Jiaxin <jiaxin.wu@intel.com> Reviewed-by: Fu Siyuan <siyuan.fu@intel.com>
Diffstat (limited to 'NetworkPkg/HttpDxe/HttpDriver.c')
-rw-r--r--NetworkPkg/HttpDxe/HttpDriver.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/NetworkPkg/HttpDxe/HttpDriver.c b/NetworkPkg/HttpDxe/HttpDriver.c
index 2518f4e707..0bde012ebb 100644
--- a/NetworkPkg/HttpDxe/HttpDriver.c
+++ b/NetworkPkg/HttpDxe/HttpDriver.c
@@ -2,6 +2,7 @@
The driver binding and service binding protocol for HttpDxe driver.
Copyright (c) 2015, Intel Corporation. All rights reserved.<BR>
+ (C) Copyright 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
@@ -939,6 +940,8 @@ HttpServiceBindingCreateChild (
HttpInstance->Signature = HTTP_PROTOCOL_SIGNATURE;
HttpInstance->Service = HttpService;
+ HttpInstance->Method = HttpMethodMax;
+
CopyMem (&HttpInstance->Http, &mEfiHttpTemplate, sizeof (HttpInstance->Http));
NetMapInit (&HttpInstance->TxTokens);
NetMapInit (&HttpInstance->RxTokens);