-
Notifications
You must be signed in to change notification settings - Fork 2.1k
Check if the file exists before trying to download it #28598
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
Conversation
|
We should cover this with integration tests. There's a "local" external storage on which we could remotely delete the file to test this. |
|
I'd rather wait for @owncloud/qa for the integration tests. I'm not sure how it is planned or what is being covered for external storages. |
|
@owncloud/qa can you help @jvillafanez write the tests? |
|
CI restarted. Since this at least has unit tests I think we can merge first. |
|
https://travis-ci.org/owncloud/core/jobs/261783308 got some wacky error when testing setting invalid quotas. I copied the error output in case I see it again, then restarted that job - hopefully Travis will be happy in 20 minutes or so. |
|
@jvillafanez please backport to stable10 |
|
Backport to stable10: #28613 |
|
integration test here: #28614 |
|
This thread has been automatically locked since there has not been any recent activity after it was closed. Please open a new issue for related bugs. |
Description
When a mount point isn't set to check for changes on access, a 503 HTTP code could be thrown if that file has been removed. With the PR, it will throw a 404 HTTP code instead.
Related Issue
No public issue
Motivation and Context
Throw the right error instead of a wrong one.
How Has This Been Tested?
Manually with SFTP: upload a file through ownCloud to a SFTP mount configured with "check for changes = never", remove the file in the backend, try to download the file.
A 404 HTTP code will be thrown, although the page show to the user will be the same
Screenshots (if appropriate):
Types of changes
Checklist: