[edk2-devel] [PATCH 3/4] NetworkPkg/HttpDxe: Detect 'Connection: close' header
Gerd Hoffmann
kraxel at redhat.com
Mon Mar 7 11:59:22 UTC 2022
On Fri, Mar 04, 2022 at 02:34:30PM +0100, Oliver Steffen wrote:
> REF: https://bugzilla.tianocore.org/show_bug.cgi?id=2720
>
> Force connecton close before the next request if
> the server sends the 'Connection: close' header.
>
> Signed-off-by: Oliver Steffen <osteffen at redhat.com>
> ---
> NetworkPkg/HttpDxe/HttpImpl.c | 11 +++++++++++
> 1 file changed, 11 insertions(+)
>
> diff --git a/NetworkPkg/HttpDxe/HttpImpl.c b/NetworkPkg/HttpDxe/HttpImpl.c
> index d8b014c94f..a1a3eea585 100644
> --- a/NetworkPkg/HttpDxe/HttpImpl.c
> +++ b/NetworkPkg/HttpDxe/HttpImpl.c
> @@ -994,6 +994,7 @@ HttpResponseWorker (
> UINTN HdrLen;
>
> NET_FRAGMENT Fragment;
>
> UINT32 TimeoutValue;
>
> + UINTN index;
Should be "Index" (edk2 codestyle).
> + if ((AsciiStriCmp ("Connection", HttpMsg->Headers[index].FieldName) == 0) &&
>
> + (AsciiStriCmp ("close", HttpMsg->Headers[index].FieldValue) == 0))
>
> + {
>
> + DEBUG ((DEBUG_WARN, "Http: 'Connection: close' header received.\n"));
I'd suggest to use DEBUG_VERBOSE here.
Otherwise the patch looks good to me.
take care,
Gerd
-=-=-=-=-=-=-=-=-=-=-=-
Groups.io Links: You receive all messages sent to this group.
View/Reply Online (#87313): https://edk2.groups.io/g/devel/message/87313
Mute This Topic: https://groups.io/mt/89555130/1813853
Group Owner: devel+owner at edk2.groups.io
Unsubscribe: https://edk2.groups.io/g/devel/unsub [edk2-devel-archive at redhat.com]
-=-=-=-=-=-=-=-=-=-=-=-
More information about the edk2-devel-archive
mailing list