| 888 | } |
| 889 | |
| 890 | static int match_curl_h2_trace(const char *line, const char **out) |
| 891 | { |
| 892 | const char *p; |
| 893 | |
| 894 | /* |
| 895 | * curl prior to 8.1.0 gives us: |
| 896 | * |
| 897 | * h2h3 [<header-name>: <header-val>] |
| 898 | * |
| 899 | * Starting in 8.1.0, the first token became just "h2". |
| 900 | */ |
| 901 | if (skip_iprefix(line, "h2h3 [", out) || |
| 902 | skip_iprefix(line, "h2 [", out)) |
| 903 | return 1; |
| 904 | |
| 905 | /* |
| 906 | * curl 8.3.0 uses: |
| 907 | * [HTTP/2] [<stream-id>] [<header-name>: <header-val>] |
| 908 | * where <stream-id> is numeric. |
| 909 | */ |
| 910 | if (skip_iprefix(line, "[HTTP/2] [", &p)) { |
| 911 | while (isdigit(*p)) |
| 912 | p++; |
| 913 | if (skip_prefix(p, "] [", out)) |
| 914 | return 1; |
| 915 | } |
| 916 | |
| 917 | return 0; |
| 918 | } |
| 919 | |
| 920 | /* Redact headers in info */ |
| 921 | static void redact_sensitive_info_header(struct strbuf *header) |
no outgoing calls
no test coverage detected