lfs-test-server icon indicating copy to clipboard operation
lfs-test-server copied to clipboard

Unable to download file with its only url

Open Yopai opened this issue 10 years ago • 2 comments

Hi, thanks for the LFS-mechanism, that's great !

If I try to download an object directly with its url - the one I read in the , I got a 404. http://localhost:8080/user/repo/objects/sha

It should rather return a 403, and allow downloading the file after authentication - and in password useless case (Issue #29), it should directly deliver the file.

And the management console, in the "Objects" tab, should link each sha to download the file.

Let me know your remarks about that, I can (try to) implement it in a PR.

Yopai avatar Aug 07 '15 10:08 Yopai

I think you're right, the authentication handling isn't quite right. I'd be happy to take a PR, otherwise I can get to it shortly.

rubyist avatar Aug 17 '15 18:08 rubyist

Got an eye in the code (and got it back, it helps) In fact, there's a 404 because mux routes check the Accept header. So, I well understood, - in the current state of the app - there is to :

  • add a generic route handler which catches anything not having the correct Accept Header
  • send a 406 (Not Acceptable), right ?

Yopai avatar Aug 17 '15 22:08 Yopai