]> git.ipfire.org Git - thirdparty/git.git/commit
http: factor out matching of curl http/2 trace lines
authorJeff King <peff@peff.net>
Fri, 15 Sep 2023 11:33:16 +0000 (07:33 -0400)
committerJunio C Hamano <gitster@pobox.com>
Fri, 15 Sep 2023 17:54:08 +0000 (10:54 -0700)
commit39fa527c8976da84cf70a9ea6b6d92a1fd9bd772
treee5eaeecf451a22ce860dd0c4c46d18ebe89a552b
parentdb30130165bef1ceff04c0163db6676db23ba2fc
http: factor out matching of curl http/2 trace lines

We have to parse out curl's http/2 trace lines so we can redact their
headers. We already match two different types of lines from various
vintages of curl. In preparation for adding another (which will be
slightly more complex), let's pull the matching into its own function,
rather than doing it in the middle of a conditional.

While we're doing so, let's expand the comment a bit to describe the two
matches. That probably should have been part of db30130165 (http: handle
both "h2" and "h2h3" in curl info lines, 2023-06-17), but will become
even more important as we add new types.

Signed-off-by: Jeff King <peff@peff.net>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
http.c