All of lore.kernel.org
 help / color / mirror / Atom feed
From: Jeff King <peff@peff.net>
To: Carlo Arenas <carenas@gmail.com>
Cc: git@vger.kernel.org, Daniel Stenberg <daniel@haxx.se>
Subject: Re: [PATCH] http: match headers case-insensitively when redacting
Date: Tue, 21 Sep 2021 16:40:39 -0400	[thread overview]
Message-ID: <YUpDRyfYN8gBcTOh@coredump.intra.peff.net> (raw)
In-Reply-To: <CAPUEspgrqxrhp-5diEenH+vevWi3QtxpjPqTwDuU5J-JHOXg9A@mail.gmail.com>

On Tue, Sep 21, 2021 at 01:14:21PM -0700, Carlo Arenas wrote:

> On Tue, Sep 21, 2021 at 12:48 PM Jeff King <peff@peff.net> wrote:
> > But certainly I found the behavior surprising. :) I'd guess it's because
> > HTTP/2 is sending some binary goo instead of text headers, and the names
> > we get are just coming from some lookup table? Or maybe I'm just showing
> > my ignorance of HTTP/2.
> 
> AFAIK headers in HTTP/2 MUST be lowercase as per the SPEC[1]
> 
> Carlo
> 
> [1] https://datatracker.ietf.org/doc/html/rfc7540#section-8.1.2

Yeah, I did some more reading and found that, too. From Daniel on
StackOverflow, no less:

  https://stackoverflow.com/questions/54067796/preserving-case-of-http-headers-with-curl

So it probably is reasonable to present them to the debug code in that
way. It is a bit weird that we may see them differently depending on
whether curl decided to use HTTP/1.1 or HTTP/2 under the hood, but
matching the on-the-wire format is probably the least-bad thing.

-Peff

  reply	other threads:[~2021-09-21 20:40 UTC|newest]

Thread overview: 22+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-09-21 18:41 [PATCH] http: match headers case-insensitively when redacting Jeff King
2021-09-21 18:47 ` Jeff King
2021-09-21 20:14   ` Carlo Arenas
2021-09-21 20:40     ` Jeff King [this message]
2021-09-21 22:00   ` Daniel Stenberg
2021-09-22  2:32     ` Jeff King
2021-09-21 19:06 ` Eric Sunshine
2021-09-21 19:14   ` Jeff King
2021-09-22 19:10     ` Junio C Hamano
2021-09-21 21:20 ` Taylor Blau
2021-09-22  2:30   ` Jeff King
2021-09-22  2:32 ` Bagas Sanjaya
2021-09-22 20:11   ` Jeff King
2021-09-23  1:22     ` Ævar Arnfjörð Bjarmason
2021-09-23 21:56       ` Jeff King
2021-09-22 19:19 ` Junio C Hamano
2021-09-22 20:09   ` Jeff King
2021-09-22 20:51     ` Junio C Hamano
2021-09-22 21:18       ` Jeff King
2021-09-22 21:42         ` Junio C Hamano
2021-09-22 22:11           ` [PATCH v2] " Jeff King
2021-09-22 22:14             ` Jeff King

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-all 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=YUpDRyfYN8gBcTOh@coredump.intra.peff.net \
    --to=peff@peff.net \
    --cc=carenas@gmail.com \
    --cc=daniel@haxx.se \
    --cc=git@vger.kernel.org \
    /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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.