-
Notifications
You must be signed in to change notification settings - Fork 2.5k
308 Redirects are not followed #4675
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
Comments
For reference 308 Permanent Redirect seems to be a newer code introduced to work around some libraries misusing 301 Moved Permanently. Mozilla's documentation about the latter suggests using 308 for |
That's more about keeping the verb the same, 308 & GET is perfectly valid |
Hi @ZanderBrown, and sorry for not providing more feedback earlier. The fix for this issue should be trivially to do, as you've also already found the correct location where to implement it. Do you wish to give it a try yourself after all this time? Otherwise I'd take this over and implement it myself. |
I've not built libgit2 before so it's probably faster if you do it |
I'm just trying to lure you into the project ;) So I'm not particularly concerned about how fast this is getting resolved -- if you feel like you'd be interested to give it a try I'd be more than happy to leave it to you. |
You win :-) |
Fixed via #4848 |
Reproduction steps
Try to clone a GitLab repository like https://gitlab.com/esodan/gresg/ (including the final / and without .git) - I used gnome-builder to do this
Expected behaviour
The repository is cloned after any necessary redirects
Actual behaviour
Clone fails with error quoting status 308
Version of libgit2 (release number or SHA1)
That used in
3.29.2-18-gb86e3ec flatpak-nightly
(not sure what that links to) but should affect all versionsOperating system(s) tested
Fedora 28/flatpak
A 308 is defined as:
So basically it should be followed in the same way as 301, 302, 303 & 307
libgit2/src/transports/http.c
Lines 395 to 398 in 408b16c
Originally reported @ GNOME Builder
The text was updated successfully, but these errors were encountered: