-
Notifications
You must be signed in to change notification settings - Fork 1.5k
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
Propagate Range header to underlying storage #527
Conversation
thank you @ochaton , very impressive! I can test on local a gdrive storage, but I'd need someone else to test for s3 and storj maybe for s3 I can try with minio |
My general setup is transfer.sh in front of S3 storage. But it would be better if you test patch yourself :) |
I can test both S3 and Storj early next week. |
@stefanbenten @aspacca Any updates? |
@ochaton do you mind if i push on your branch to check to test range in gdrive? |
@stefanbenten , @ochaton where you able to test storj and s3 with my commit added? I will think about bumping |
do you mean in terms of respecting not sure it will make a huge difference in the end: we could prevent range to be fulfilled if |
tested with s3 on localhost @stefanbenten did you have the chance to test with storj? |
I didn't get the idea of Max-Downloads. Does anyone use it to limit "only-once" downloads or it can be used in different way? Maybe you have some production statistics? Nevertheless it seems that ignoring Range header for objects with defined 'Max-Downloads' in metadata file is the only option to keep compatibility. |
I've made an attempt to support downloads with passed Range header and propagate Range to underlying storage (except GDrive, I didn't find any clue in the gdrive doc how to pass Range header to it).
Only range with single slice is supported, and I didn't implement suffix and prefix ranges. If Range is not satisfied then header is ignored (it seems legit by RFC, but maybe it is better to respond with HTTP 416).
This patch does not fix the problem with downloads limiting :( this is really hard. IMO, it is better to not allow range downloads for limited content.
realtes to #490