Merge branch 'jk/redact-h2h3-headers-fix' into maint-2.41

* jk/redact-h2h3-headers-fix:
  http: handle both "h2" and "h2h3" in curl info lines
This commit is contained in:
Junio C Hamano 2023-06-24 15:04:48 -07:00
commit fb7d80edca

3
http.c
View file

@ -746,7 +746,8 @@ static void redact_sensitive_info_header(struct strbuf *header)
* h2h3 [<header-name>: <header-val>]
*/
if (trace_curl_redact &&
skip_iprefix(header->buf, "h2h3 [", &sensitive_header)) {
(skip_iprefix(header->buf, "h2h3 [", &sensitive_header) ||
skip_iprefix(header->buf, "h2 [", &sensitive_header))) {
if (redact_sensitive_header(header, sensitive_header - header->buf)) {
/* redaction ate our closing bracket */
strbuf_addch(header, ']');