]> git.koha-community.org Git - koha.git/commit
Bug 36531: Serve text/javascript compressed, like application/javascript is
authorPhil Ringnalda <phil@chetcolibrary.org>
Fri, 5 Apr 2024 01:59:34 +0000 (18:59 -0700)
committerLucas Gass <lucas@bywatersolutions.com>
Tue, 28 May 2024 17:46:35 +0000 (17:46 +0000)
commitb9d4408648ac5450ccb071f817b9a25a9d3506cd
tree0173c3c991dfb779a8aaeb0a7d9a525239077df5
parent1a8ed12e09660eb3f823dde861dbe8c5e58f4cdd
Bug 36531: Serve text/javascript compressed, like application/javascript is

Koha serves static .js files as application/javascript (if /etc/mime.types
says to) and serves them compressed, but output_with_http_headers uses the
currently-correct text/javascript mimetype, and Koha doesn't compress that.

Test plan:
1. Set the preference EnableAdvancedCatalogingEditor to Enable.
2. Open the browser Web Developer Tools to the Network tab
3. Load Cataloging - Advanced editor
4. Click on the line for the framework?frameworkcode=&callback=define load
5. Note the content-type text/javascript, no Content-Encoding line, and
   the size of 1.9MB
6. Apply the patches from bug 36463 if they haven't been pushed, then this
   patch, and reset_all
7. Repeat steps 1-4, and note a Content-Encoding: gzip header and a
   Transferred size around 160KB

Signed-off-by: David Nind <david@davidnind.com>
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
(cherry picked from commit c52af2cef0d79f20d74ebf170d4d5514b139ea65)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
(cherry picked from commit 3e0c3032b6f397f2b83073a6d274cdcfd370415e)
Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
debian/templates/apache-shared.conf
etc/koha-httpd.conf