From: "Gerd Hoffmann" <kraxel@redhat.com>
To: devel@edk2.groups.io, osteffen@redhat.com
Subject: Re: [edk2-devel] [PATCH 4/4] NetworkPkg/HttpDxe: Detect non-HTTP/1.1 servers
Date: Mon, 7 Mar 2022 13:07:24 +0100 [thread overview]
Message-ID: <20220307120724.uismzhj2gaezgf25@sirius.home.kraxel.org> (raw)
In-Reply-To: <20220304133431.53378-5-osteffen@redhat.com>
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
prev parent reply other threads:[~2022-03-07 12:07 UTC|newest]
Thread overview: 9+ messages / expand[flat|nested] mbox.gz Atom feed top
2022-03-04 13:34 [PATCH 0/4] Http Fixes Oliver Steffen
2022-03-04 13:34 ` [PATCH 1/4] NetworkPkg/HttpDxe: Decofigure Tcp4 before reconfiguring Oliver Steffen
2022-03-07 11:52 ` [edk2-devel] " Gerd Hoffmann
2022-03-04 13:34 ` [PATCH 2/4] NetworkPkg/HttpDxe: Add ConnectionClose flag fo HTTP_PROTOCOL Oliver Steffen
2022-03-07 11:55 ` [edk2-devel] " Gerd Hoffmann
2022-03-04 13:34 ` [PATCH 3/4] NetworkPkg/HttpDxe: Detect 'Connection: close' header Oliver Steffen
2022-03-07 11:59 ` [edk2-devel] " Gerd Hoffmann
2022-03-04 13:34 ` [PATCH 4/4] NetworkPkg/HttpDxe: Detect non-HTTP/1.1 servers Oliver Steffen
2022-03-07 12:07 ` Gerd Hoffmann [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=20220307120724.uismzhj2gaezgf25@sirius.home.kraxel.org \
--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