git/list[1] front-page[2] threads[3] people[4] search[5] about
 

Re: [PATCH] http: match headers case-insensitively when redacting

From
Jeff King <peff@peff.net>
Date
Sep 22, 2021, 02:30 UTC
Message-ID
<YUqVMbhqiwMFmbqg@coredump.intra.peff.net>
In-Reply-To
<YUpMreNwBDSygFSf@nand.local>
On Tue, Sep 21, 2021 at 05:20:45PM -0400, Taylor Blau wrote:
> I'd be fine with assuming that the http2 module is available everywhere,
> but only because the tests are optional in the first place. I agree that
> we'd want to run our suite of HTTP-related tests in both HTTP/2 and
> HTTP/1.1 mode.

Yeah, it's really only a problem if we lose some coverage of http on particular platforms. But I suspect it's relatively rare for people to run the http tests in the first place.

Show 5 quoted lines
> But that doesn't mean we have to reconfigure our Apache server midway
> through the test, since HTTP/2 servers should keep the HTTP/1.1
> conversation going if the client doesn't reply with 'Connection:
> upgrade; Upgrade: h2c'. At least, I think that's the case based on my
> fairly rudimentary understanding of HTTP/2 ;).

Right. If we were doing ALPN, curl would automatically do HTTP/2 if the server supports it. But since we're not, then yes, we can control it from the client side. I think I'd probably break it into two scripts anyway, though, like:

  #!/bin/sh
  test_description='variant of t5551 for http2'
  . ./test-lib.sh
  test_expect_success 'turn on http/2' '
	git config --global http.version HTTP/2 &&
	test_set_prereq HTTP2
  '
  # presumably it learns to skip its preamble if test_description is
  # already set. Or we could pull it out to a common lib-t5551 file.
  . t5551-http-fetch-smart.sh

But TBH I'm not sure if it's even worth the effort. We did find one obscure case here, but AFAICT this would be unlikely to turn up anything useful. I dunno. And really, you'd want to do it for all http-related test scripts, not just this one. That's quite a bit more work.

-Peff
Previous: Taylor BlauNext: Bagas Sanjaya
Message 11 of 22 in “http: match headers case-insensitively when redacting”
  1. http: match headers case-insensitively when redactingJeff King, Sep 21, 2021
  2. Jeff KingSep 21, 2021
  3. Carlo ArenasSep 21, 2021
  4. Jeff KingSep 21, 2021
  5. Daniel StenbergSep 21, 2021
  6. Jeff KingSep 22, 2021
  7. Eric SunshineSep 21, 2021
  8. Jeff KingSep 21, 2021
  9. Junio C HamanoSep 22, 2021
  10. Taylor BlauSep 21, 2021
  11. Jeff KingSep 22, 2021
  12. Bagas SanjayaSep 22, 2021
  13. Jeff KingSep 22, 2021
  14. Ævar Arnfjörð BjarmasonSep 23, 2021
  15. Jeff KingSep 23, 2021
  16. Junio C HamanoSep 22, 2021
  17. Jeff KingSep 22, 2021
  18. Junio C HamanoSep 22, 2021
  19. Jeff KingSep 22, 2021
  20. Junio C HamanoSep 22, 2021
  21. http: match headers case-insensitively when redactingJeff King, Sep 22, 2021
  22. Jeff KingSep 22, 2021

Read the whole thread, see it on lore, or plain text.

$ cat FOOTERMessages come from the public archive at lore.kernel.org/git, fetched every hour. The front page is chosen and written each morning by an AI editor and can be wrong; the threads themselves are the record. About and API. For agents: an MCP server at https://gitlist.dev/mcp, and any thread, story or person page as Markdown by adding .md to its URL (or sending Accept: text/markdown). Details in /llms.txt.