1
0
Fork 0
mirror of https://we.phorge.it/source/phorge.git synced 2025-01-08 13:51:02 +01:00
phorge-phorge/src/applications/files/controller
epriestley 3573170dfa Compress file downloads if the client sends "Accept-Encoding: gzip" and we guess the file might compress alright
Summary:
Ref T13507. We currently compress normal responses, but do not compress file data responses because most files we serve are images and already compressed.

However, there are some cases where large files may be highly compressible (e.g., huge XML files stored in LFS) and we can benefit from compressing responses.

Make a reasonable guess about whether compression is beneficial and enable compression if we guess it is.

Test Plan:
  - Used `curl ...` to download an image with `Accept-Encoding: gzip`. Got raw image data in the response (as expected, because we don't expect images to be worthwhile to recompress).
  - Used `curl ...` to download a text file with `Accept-Encoding: gzip`. Got a compressed response. Decompressed the response into the original file.

Maniphest Tasks: T13507

Differential Revision: https://secure.phabricator.com/D21125
2020-04-15 11:53:35 -07:00
..
PhabricatorFileComposeController.php More button grey conversions 2017-06-07 09:34:50 -07:00
PhabricatorFileController.php Remove newFromMenu() from SideNav 2016-01-14 05:33:34 -08:00
PhabricatorFileDataController.php Compress file downloads if the client sends "Accept-Encoding: gzip" and we guess the file might compress alright 2020-04-15 11:53:35 -07:00
PhabricatorFileDeleteController.php Switch File deletion to use ModularTransactions 2017-04-18 13:01:51 -07:00
PhabricatorFileDocumentController.php Move Diffusion browse rendering to DocumentEngine, breaking almost all features 2018-04-09 04:46:26 -07:00
PhabricatorFileDropUploadController.php Provide an <input type="file"> control in Remarkup for mobile and users with esoteric windowing systems 2016-05-20 16:24:22 -07:00
PhabricatorFileEditController.php Move Files editing and commenting to EditEngine 2017-04-04 16:15:11 -07:00
PhabricatorFileIconSetSelectController.php Add more icon choices to Badges 2017-03-03 13:45:53 -08:00
PhabricatorFileImageProxyController.php Don't require prototypes for "{image ...}" 2018-03-08 07:04:23 -08:00
PhabricatorFileLightboxController.php Replace all "setQueryParam()" calls with "remove/replaceQueryParam()" 2019-02-14 11:56:39 -08:00
PhabricatorFileListController.php Remove newFromMenu() from SideNav 2016-01-14 05:33:34 -08:00
PhabricatorFileTransformController.php When file transforms race and lose, accept defeat gracefully 2015-05-21 09:42:20 -07:00
PhabricatorFileTransformListController.php Replace all "setQueryParam()" calls with "remove/replaceQueryParam()" 2019-02-14 11:56:39 -08:00
PhabricatorFileUploadController.php Update file edit UI 2017-09-07 11:35:40 -07:00
PhabricatorFileUploadDialogController.php Allow Pholio mocks to be created and edited without drag-and-drop 2016-06-09 08:43:38 -07:00
PhabricatorFileViewController.php Pull file Document Engine rendering out of "Files" application controllers 2018-04-09 04:45:58 -07:00