-
Notifications
You must be signed in to change notification settings - Fork 2.5k
Handle cases where content length of an http response is zero #7024
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
base: main
Are you sure you want to change the base?
Conversation
Hey @lrm29 - curious if this is ready for review? Is there anything that I can help with? |
Sorry, yes, I'm using this patch and think I would have heard of problems by now... I'm wary of not having test coverage for this in libgit2 itself (would be nice to be able to mock the server to be able to test the logic, rather than having to add a new test server). It's clearly unusual to receive empty responses. It seems to be quite particular to a test Git server I've got running in a docker container, and tests against that pass with this patch. There's more description of the issue in #7013. |
Thanks! Wanted to check in because I've been ignoring it since it was marked as draft but it also looks correct and complete. I'll pull it in to a v1.9.1. |
Hi, when will this fix be reflected in pygit2? |
@ethomson, would be good to get this merged in if it passes review, seems to be more common than I originally thought. |
Specifically, it affects all redirects from gitlab, both self-hosted as well as on gitlab.com. I can confirm that this PR solves the problem. EDIT: Specifically gitlab 18 is changing the behaviour to return an empty body, earlier versions had a little piece of HTML as response body |
Closes #7090
Closes #7070