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

curl: fix --write-out '%{http_code}' with Secure Channel #122

Merged
merged 1 commit into from
Jun 6, 2024

Conversation

dscho
Copy link
Member

@dscho dscho commented Jun 6, 2024

The git update-git-for-windows command is a Unix Shell script that relies heavily on curl; For example, it calls:

curl --silent --show-error --output /tmp/gfw-httpget-ruMLqjGG.txt
--write-out '%{http_code}'
https://api.github.com/repos/git-for-windows/git/releases/latest

This worked well until cURL v8.8.0 was integrated. With the Secure Channel backend, the invocation would fail with this error message:

curl: (43) A libcurl function was given a bad argument

The same issue had been reported for a different SSL backend: curl/curl#13845. Conveniently, all we have to do is to Backport the fix from the PR that addressed that ticket to address the bug at hand.

This fixes microsoft/git#655.

@dscho dscho requested a review from derrickstolee June 6, 2024 12:08
@dscho dscho self-assigned this Jun 6, 2024
The `git update-git-for-windows` command is a Unix Shell script that
relies heavily on `curl`; For example, it calls:

  curl --silent --show-error --output /tmp/gfw-httpget-ruMLqjGG.txt \
    --write-out '%{http_code}' \
    https://api.github.com/repos/git-for-windows/git/releases/latest

This worked well until cURL v8.8.0 was integrated. With the Secure
Channel backend, the invocation would fail with this error message:

  curl: (43) A libcurl function was given a bad argument

The same issue had been reported for a different SSL backend:
curl/curl#13845. Conveniently, all we have to
do is to Backport the fix from the PR that addressed that ticket to
address the bug at hand.

This fixes microsoft/git#655.

Signed-off-by: Johannes Schindelin <johannes.schindelin@gmx.de>
@dscho
Copy link
Member Author

dscho commented Jun 6, 2024

/deploy

@dscho
Copy link
Member Author

dscho commented Jun 6, 2024

/deploy mingw-w64-curl

The i686/x86_64 and the arm64 workflow runs were started.

Copy link

@derrickstolee derrickstolee left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thank you for the fix, @dscho. What's the plan for getting back onto mainline curl after your patch is accepted by curl?

@dscho
Copy link
Member Author

dscho commented Jun 6, 2024

What's the plan for getting back onto mainline curl after your patch is accepted by curl?

The patch was backported from cURL, it'll be in their next version, so it's a smooth path back to mainline ;-)

@dscho dscho merged commit e09a7a9 into git-for-windows:main Jun 6, 2024
5 checks passed
@dscho dscho deleted the mingw-w64-curl-8.8.0 branch June 6, 2024 14:33
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.

update-git-for-windows seems to be broken on 2.45.2.vfs.0.0
2 participants