On Fri, Mar 04, 2022 at 02:34:31PM +0100, Oliver Steffen wrote:
> REF: https://bugzilla.tianocore.org/show_bug.cgi?id=2720
>
> Force connecton close before the next request if
> the server does not identify as version 1.1.
>
> Signed-off-by: Oliver Steffen <osteffen@redhat.com>
> ---
> NetworkPkg/HttpDxe/HttpImpl.c | 8 ++++++++
> 1 file changed, 8 insertions(+)
>
> diff --git a/NetworkPkg/HttpDxe/HttpImpl.c b/NetworkPkg/HttpDxe/HttpImpl.c
> index a1a3eea585..ea1ab60517 100644
> --- a/NetworkPkg/HttpDxe/HttpImpl.c
> +++ b/NetworkPkg/HttpDxe/HttpImpl.c
> @@ -1105,6 +1105,14 @@ HttpResponseWorker (
> HttpInstance->CacheLen = BodyLen;
>
> }
>
>
>
> + //
>
> + // Check server's HTTP version.
>
> + //
>
> + if (AsciiStrnCmp (HttpHeaders, HTTP_VERSION, AsciiStrLen (HTTP_VERSION)) != 0) {
Better explicitly check for 1.0 here? That is the special case we are
looking for here: http/1.0 has no pipelining, so we close the connection
in that case.
As long as edk2 has no support for http/2.0 it doesn't make a difference
in practice though.
> + DEBUG ((DEBUG_WARN, "HTTP: Server version is not 1.1. Setting Connection close.\n"));
Same here, should better use DEBUG_VERBOSE.
take care,
Gerd
-=-=-=-=-=-=-=-=-=-=-=-
Groups.io Links: You receive all messages sent to this group.
View/Reply Online (#87314): https://edk2.groups.io/g/devel/message/87314
Mute This Topic: https://groups.io/mt/89555131/1787277
Group Owner: devel+owner@edk2.groups.io
Unsubscribe: https://edk2.groups.io/g/devel/unsub [importer@patchew.org]
-=-=-=-=-=-=-=-=-=-=-=-