1
0
Fork 0
mirror of https://we.phorge.it/source/phorge.git synced 2025-01-07 13:21:02 +01:00
phorge-phorge/src/applications/files
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
..
action Simplify implementation of "SysetemAction->getSystemActionConstant()" 2019-07-19 15:45:37 -07:00
application Add a test to verify that all routing maps are plausibly valid, and remove some dead routes 2020-02-14 18:06:24 -08:00
applicationpanel Allow diffusion.filecontentquery to load data for arbitrarily large files 2016-01-21 09:52:43 -08:00
builtin Reduce the cost of generating default user profile images 2018-03-01 16:53:17 -08:00
capability Add default policy to Files application 2014-11-21 11:17:20 -08:00
conduit Stop trying to assess the image dimensions of large files and file chunks 2017-12-18 09:17:32 -08:00
config Remove "metamta.*.subject-prefix" options 2019-01-17 19:18:50 -08:00
constants Prettier file embeds 2016-11-27 14:57:06 -08:00
controller 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
diff Fix an issue where the last line of block-based diffs could be incorrectly hidden 2020-01-30 08:19:09 -08:00
document Continue moving classes with no callers in libphutil or Arcanist to Phabricator 2020-02-12 13:14:04 -08:00
edge Modernize remaining edge types 2015-01-03 10:58:20 +11:00
editor Remove "metamta.*.subject-prefix" options 2019-01-17 19:18:50 -08:00
engine Kick off indexing for File objects on creation 2017-04-18 08:38:34 -07:00
exception Store and verify content integrity checksums for files 2017-04-05 11:12:31 -07:00
favicon Recover more gracefully when favicon configuration points at a corrupt/damaged file 2018-04-27 12:02:32 -07:00
format Support HMAC+SHA256 with automatic key generation and management 2017-04-06 15:42:59 -07:00
garbagecollector Implement ngram search for File objects 2017-04-17 17:37:20 -07:00
iconset Convert all calls to 'IconFont' to just 'Icon' 2016-01-27 20:59:27 -08:00
keyring Support AES256 at-rest encryption in Files 2016-06-16 08:08:56 -07:00
lipsum Make bin/lipsum generate hanldle generator keys and arguments more clearly 2017-02-27 09:09:28 -08:00
mail Remove "metamta.*.subject-prefix" options 2019-01-17 19:18:50 -08:00
management Make "bin/files" parsing of working set arguments more consistent 2019-06-24 16:02:39 -07:00
markup Replace all "setQueryParam()" calls with "remove/replaceQueryParam()" 2019-02-14 11:56:39 -08:00
phid Mark PhabricatorPHIDType::getPHIDTypeApplicationClass() as abstract 2015-11-03 06:47:12 +11:00
query Add "bin/file migrate" options to support import of a local-disk backup for Phacility instances 2019-06-15 08:12:11 -07:00
storage Remove "getApplicationTransactionObject()" from ApplicationTransactionInterface 2018-12-20 15:16:19 -08:00
transform Add unit tests for file thumbnail generation 2017-04-23 11:02:21 -07:00
typeahead Add a basic icon typeahead 2017-02-03 09:19:29 -08:00
uploadsource Support export of data in files larger than 8MB 2018-01-29 15:58:34 -08:00
view Allow users to drop .ics files on calendar views to import them 2016-10-18 15:26:44 -07:00
worker Make daemons perform file deletion 2017-04-18 11:09:41 -07:00
xaction Switch File deletion to use ModularTransactions 2017-04-18 13:01:51 -07:00
PhabricatorImageTransformer.php Somewhat improve meme transform code so it is merely very bad 2018-03-08 11:08:55 -08:00