-
Notifications
You must be signed in to change notification settings - Fork 163
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
lfs-test-server tricks client into violation of LFS spec #85
Comments
Same issue in gitea (because their code is based on lfs-test-server): go-gitea/gitea#6960 |
Also see git-lfs/git-lfs#3662. |
See go-gitea/gitea#7015 for a way to fix server while preserving compatibility with git-lfs versions that do not have git-lfs/git-lfs#3662 fixed. |
Yeah, I think this definitely should be fixed. I have a fix and am in the middle of writing some tests for this. |
Feel free to @ me when you publish your changes. |
Actually, I just realized that I can't write a test for this because that code path requires |
https://github.com/git-lfs/lfs-test-server/blob/master/server.go#L554
Server tells client to use
Accept: application/vnd.git-lfs
header when accessing various links, including/verify
. However, LFS specification clearly states that client sendsAccept: application/vnd.git-lfs+json
when accessing verification link.Current behavior turns our to work with native
git-lfs
implementation, but not with other clients (git-lfs-java
, for example) and overall is very fragile and depends on the order in which client builds its HTTP headers list.The text was updated successfully, but these errors were encountered: