Skip to content
This repository has been archived by the owner on Apr 18, 2023. It is now read-only.

Handle downloading large files over multiple requests #14

Closed
derat opened this issue Feb 25, 2021 · 2 comments
Closed

Handle downloading large files over multiple requests #14

derat opened this issue Feb 25, 2021 · 2 comments
Assignees
Labels
bug Something isn't working

Comments

@derat
Copy link
Owner

derat commented Feb 25, 2021

For derat/nup#10, I made the server truncate responses to a bit under 32 MB to avoid hitting App Engine's limit. The Android client needs to be updated to handle this properly -- right now, it assumes that it'll get a 200 response containing all of the data unless it explicitly sent a Range header to resume an interrupted download.

@derat derat added the bug Something isn't working label Feb 25, 2021
@derat derat self-assigned this Feb 25, 2021
derat added a commit that referenced this issue Feb 25, 2021
Parse Content-Range headers included in 206 responses to
handle the server intentionally sending partial data to
avoid hitting App Engine's 32 MB limit.

This implementation is incomplete, since FileCache should
make additional requests to get the rest of the data. Right
now, it won't download the next chunk until the next time
that the song is prepared for playback.
@derat
Copy link
Owner Author

derat commented Mar 22, 2021

This is probably good enough for now.

@derat derat closed this as completed Mar 22, 2021
@derat
Copy link
Owner Author

derat commented Mar 27, 2021

263639a made the client automatically request the rest of the song. Previously, it just downloaded the first 32 MB and didn't send another request until the next time the song was played.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

1 participant