HomePhabricator

Prepare file responses for streaming chunks

Description

Prepare file responses for streaming chunks

Summary:
Ref T7149. This still buffers the whole file, but is reaaaaal close to not doing that.

Allow Responses to be streamed, and rewrite the range stuff in the FileResponse so it does not rely on having the entire content available.

Test Plan:

  • Artificially slowed down downloads, suspended/resumed them (works in chrome, not so much in Safari/Firefox?)
  • Played sounds in Safari/Chrome.
  • Viewed a bunch of pages and files in every browser.

Reviewers: btrahan

Reviewed By: btrahan

Subscribers: joshuaspence, epriestley

Maniphest Tasks: T7149

Differential Revision: https://secure.phabricator.com/D12072