From d8293d31416242468323ef30c6fa2a5bf6267996 Mon Sep 17 00:00:00 2001 From: Nagaraj Hegde Date: Fri, 6 May 2016 18:20:00 +0800 Subject: 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 Reviewed-by: Fu Siyuan --- NetworkPkg/HttpDxe/HttpDriver.c | 3 +++ 1 file changed, 3 insertions(+) (limited to 'NetworkPkg/HttpDxe/HttpDriver.c') 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.
+ (C) Copyright 2016 Hewlett Packard Enterprise Development LP
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); -- cgit v1.2.3