Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Backport fix for t5559.{18,19,39} #609

Merged
merged 2 commits into from
Sep 23, 2023

Conversation

dscho
Copy link
Member

@dscho dscho commented Sep 22, 2023

HTTP Header redaction code has been adjusted for a newer version of cURL library that shows its traces differently from earlier versions.

This is purely a fix for Git's test suite, no Git behavior is actually changed by this PR, read: it has no user-visible changes.

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 db30130 (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 <[email protected]>
Signed-off-by: Junio C Hamano <[email protected]>
To redact header lines in http/2 curl traces, we have to parse past some
prefix bytes that curl sticks in the info lines it passes to us. That
changed once already, and we adapted in db30130 (http: handle both
"h2" and "h2h3" in curl info lines, 2023-06-17).

Now it has changed again, in curl's fbacb14c4 (http2: cleanup trace
messages, 2023-08-04), which was released in curl 8.3.0. Running a build
of git linked against that version will fail to redact the trace (and as
before, t5559 notices and complains).

The format here is a little more complicated than the other ones, as it
now includes a "stream id". This is not constant but is always numeric,
so we can easily parse past it.

We'll continue to match the old versions, of course, since we want to
work with many different versions of curl. We can't even select one
format at compile time, because the behavior depends on the runtime
version of curl we use, not the version we build against.

Signed-off-by: Jeff King <[email protected]>
Signed-off-by: Junio C Hamano <[email protected]>
dscho added a commit to git-for-windows/git that referenced this pull request Sep 22, 2023
HTTP Header redaction code has been adjusted for a newer version of cURL
library that shows its traces differently from earlier versions.

This is purely a fix for Git's test suite, no Git behavior is actually
changed by this PR, read: it has no user-visible changes.

This PR is a close relative of
microsoft#609.
git-for-windows-ci pushed a commit to git-for-windows/git that referenced this pull request Sep 22, 2023
HTTP Header redaction code has been adjusted for a newer version of cURL
library that shows its traces differently from earlier versions.

This is purely a fix for Git's test suite, no Git behavior is actually
changed by this PR, read: it has no user-visible changes.

This PR is a close relative of
microsoft#609.
git-for-windows-ci pushed a commit to git-for-windows/git that referenced this pull request Sep 22, 2023
HTTP Header redaction code has been adjusted for a newer version of cURL
library that shows its traces differently from earlier versions.

This is purely a fix for Git's test suite, no Git behavior is actually
changed by this PR, read: it has no user-visible changes.

This PR is a close relative of
microsoft#609.
@dscho dscho merged commit 5673d6b into microsoft:vfs-2.42.0 Sep 23, 2023
44 checks passed
git-for-windows-ci pushed a commit to git-for-windows/git that referenced this pull request Oct 15, 2023
HTTP Header redaction code has been adjusted for a newer version of cURL
library that shows its traces differently from earlier versions.

This is purely a fix for Git's test suite, no Git behavior is actually
changed by this PR, read: it has no user-visible changes.

This PR is a close relative of
microsoft#609.
dscho added a commit to git-for-windows/git that referenced this pull request Oct 19, 2023
HTTP Header redaction code has been adjusted for a newer version of cURL
library that shows its traces differently from earlier versions.

This is purely a fix for Git's test suite, no Git behavior is actually
changed by this PR, read: it has no user-visible changes.

This PR is a close relative of
microsoft#609.
dscho added a commit that referenced this pull request Nov 3, 2023
HTTP Header redaction code has been adjusted for a newer version of cURL
library that shows its traces differently from earlier versions.

This is purely a fix for Git's test suite, no Git behavior is actually
changed by this PR, read: it has no user-visible changes.
dscho added a commit that referenced this pull request Nov 3, 2023
HTTP Header redaction code has been adjusted for a newer version of cURL
library that shows its traces differently from earlier versions.

This is purely a fix for Git's test suite, no Git behavior is actually
changed by this PR, read: it has no user-visible changes.
@gitgitgadget gitgitgadget bot deleted the jk/redact-h2h3-headers-fix branch June 23, 2024 12:15
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants