-
Notifications
You must be signed in to change notification settings - Fork 113
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
fix download consistency #4923
fix download consistency #4923
Conversation
Thanks for opening this pull request! The maintainers of this repository would appreciate it if you would create a changelog item based on your changes. |
The change itself looks sane to me and I think it'll work (I haven't actually tried it yet), but I have a few thoughts. Posixfs won't be able to fulfill the But taking a step back and looking at the problem I noticed that So, what if - instead of introducing the |
How would changing the signature of 🤔 Posixfs could already open the file but then how do we close it if it is never read? ... ugh .... we always call getContent ... which we could omit in HEAD requests without a Range header. Probably just an optimization since it would only affect range requests... So yeah, we could simplify the interface for now and always return the metadata and a ReadCloser. |
Hm. No, we return early when the etag didn't change, without calling |
Yeah, I'd really like to be efficient in that case and not even open the file then. And I don't want to push down the IfNoneMatch check into the filesystem implementations. |
d73987c
to
3b4e40a
Compare
} | ||
return reader, nil | ||
return ri, reader, nil |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
hm, we are returning the ResourceInfo here ... even though the user may not have stat permissions ... I'd say that is ok for now, because Download() is only called by the dataprovider. still meh.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We are also returning a reader to the file. So I see no additional security implications.
Signed-off-by: Jörn Friedrich Dreyer <jfd@butonic.de>
Signed-off-by: Jörn Friedrich Dreyer <jfd@butonic.de>
Signed-off-by: Jörn Friedrich Dreyer <jfd@butonic.de>
Signed-off-by: Jörn Friedrich Dreyer <jfd@butonic.de>
Signed-off-by: Jörn Friedrich Dreyer <jfd@butonic.de>
abbcab2
to
4edeb44
Compare
urgh the ceph fs build fails ... we should have used an additional interface ... |
Signed-off-by: Jörn Friedrich Dreyer <jfd@butonic.de>
Signed-off-by: Jörn Friedrich Dreyer <jfd@butonic.de>
Signed-off-by: Jörn Friedrich Dreyer <jfd@butonic.de>
fixes owncloud/ocis#10526