freedomofpress / securedrop-client

a Qt-based GUI for SecureDrop journalists 📰🗞️
GNU Affero General Public License v3.0
41 stars 40 forks source link

[securedrop-proxy] Support range requests (RFC 7233) #1707

Closed heartsucker closed 2 months ago

heartsucker commented 5 years ago

Related issue in SecureDrop core: https://github.com/freedomofpress/securedrop/issues/3907

Because Tor is slow and flaky, and because long downloads are slow. We may want to support range requests to allow partial downloads to resume. The behavior would be to download file to a special, permission protected directory in /tmp so they are cleaned up on reboots. When a download would start, the proxy application would check for the presence of the file and then send the appropriate range header to pickup where the last process left off.

We would also need to guard against multiple simultaneous downloads, possibly using some sort of fcntl exclusive lock to prevent race conditions with one process finishing and then another process appending before the file move happens.

eloquence commented 4 years ago

Note: We should ask our pilot users about any difficulties downloading large files to inform prioritization of this issue.

sssoleileraaa commented 1 year ago

[Backlog pruning, 5/16] We explicitly decided that the only network level changes for that we wanted to make for MVP had to do with supporting larger sets of sources + some level of networking monitor. This would be a great improvement but it post MVP.

legoktm commented 2 months ago

proxy v2 supports range requests by just passing the headers through like any other header, and streaming the bytes back. The range support is really implemented in the client/sdk, which happened in https://github.com/freedomofpress/securedrop-client/pull/2006.