Skip to content
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

[FEATURE REQUEST] Improve downloads behaviour, not depending on Content-Length header #4417

Open
10 tasks
jesmrec opened this issue May 31, 2024 · 1 comment
Open
10 tasks

Comments

@jesmrec
Copy link
Collaborator

jesmrec commented May 31, 2024

It comes from #4352 (comment)

this is the way to do, following the line of iOS app:

By sending the Etag for the file from the last PROPFIND as If-Match header, the app can ensure it gets either:

  • the version of the file whose metadata the app already has (=> which also means the size of the file is what the PROPFIND returned)
  • or: a 412 status response indicating the file has changed in the meantime, so a PROPFIND on the file can be sent to update the metadata for the file and a download subsequently be re-attempted

Receiving a newer/different version of the file than what the last PROPFIND returned wouldn't be good for several reasons:

  • the checksum verification (if one was provided by the server) would fail, which would make the app determine the file contents was not properly or fully received, and result in the app discarding the file it just downloaded
  • the Etag would change for the file with the next PROPFIND (f.ex. while discovering changes), from the outdated one (at the time of download) to the actual one (for the file that was already downloaded). This would result in the app discarding the file it just downloaded - because it has to assume the file is has downloaded is a different version than the file on the server, due to the Etag change.

TASKS

  • Research (if needed)
  • Create branch feature/feature_name
  • Development tasks
    • Implement whatever
    • ...
    • Implement unit tests (if needed)
  • Code review and apply changes requested
  • Design test plan
  • QA
  • Merge branch feature/feature_name into master
@jesmrec
Copy link
Collaborator Author

jesmrec commented May 31, 2024

Check also de posibility of aligning Accept-Encoding: with other clients

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant