RTC PR-4.4-dev Pending

User tests: Successful: Unsuccessful:

avatar Razzo1987
Razzo1987
16 Mar 2024

Add support for brotli gz compression in htaccess.txt

From Wikipedia:

Brotli is a lossless data compression algorithm developed by Google. It uses a combination of the general-purpose LZ77 lossless compression algorithm, Huffman coding and 2nd-order context modelling. Brotli is primarily used by web servers and content delivery networks to compress HTTP content, making internet websites load faster. A successor to gzip, it is supported by all major web browsers and has become increasingly popular, as it provides better compression than gzip.

Summary of Changes

Webservers that use brotli and have Joomla's htaccess enabled will fail the website in HTTPS unless you comment/delete the code block related to GZIP.
After the change, the problem no longer occurs.

Testing Instructions

  1. Check if your hosting uses brotli.
  2. Apply the patch and copy the text from htaccess.txt to .htaccess
  3. Indicate in the test whether you tested with a hosting that uses brotli or not. I think it is useful to have tests for both cases.

Actual result BEFORE applying this Pull Request

If your hosting does not use brotli

Joomla works properly

If your hosting use brotli

Joomla in HTTP works correctly.
Joomla in HTTPS does not load the CSS and JS resources, and investigating the error in the console is: ERR_CONTENT_DECODING_FAILED

Expected result AFTER applying this Pull Request

If your hosting does not use brotli

Joomla still works properly

If your hosting use brotli

Joomla works properly

NOTE

ServerPlan uses brotli.

Thanks

Thanks to ServerPlan for supporting the tests and finding the solution

Link to documentations

Please select:

  • Documentation link for docs.joomla.org:

  • No documentation changes for docs.joomla.org needed

  • Pull Request link for manual.joomla.org:

  • No documentation changes for manual.joomla.org needed

avatar Razzo1987 Razzo1987 - open - 16 Mar 2024
avatar Razzo1987 Razzo1987 - change - 16 Mar 2024
Status New Pending
avatar Razzo1987 Razzo1987 - change - 16 Mar 2024
Labels Added: PR-4.4-dev
avatar Razzo1987 Razzo1987 - change - 16 Mar 2024
Title
Add support for brotli
[4.x] Add support for brotli
avatar Razzo1987 Razzo1987 - edited - 16 Mar 2024
avatar Razzo1987 Razzo1987 - change - 16 Mar 2024
The description was changed
avatar Razzo1987 Razzo1987 - edited - 16 Mar 2024
avatar Razzo1987 Razzo1987 - change - 16 Mar 2024
The description was changed
avatar Razzo1987 Razzo1987 - edited - 16 Mar 2024
avatar MacJoom MacJoom - test_item - 19 Mar 2024 - Tested successfully
avatar MacJoom
MacJoom - comment - 19 Mar 2024

I have tested this item ✅ successfully on 33d2ff1

I have setup brotli compression on my own server (you need to disable gzip - and you need https!) and the change in the .htaccess fixed the issue with not loaded css and js. brotli see here: https://www.brotli.pro/enable-brotli/servers/apache/


This comment was created with the J!Tracker Application at issues.joomla.org/tracker/joomla-cms/43055.

avatar Razzo1987
Razzo1987 - comment - 20 Mar 2024

INFO: It seems that with ngix instead of apache the problem does not occur

avatar dgrammatiko dgrammatiko - test_item - 21 Mar 2024 - Tested successfully
avatar dgrammatiko
dgrammatiko - comment - 21 Mar 2024

I have tested this item ✅ successfully on 33d2ff1


This comment was created with the J!Tracker Application at issues.joomla.org/tracker/joomla-cms/43055.

avatar alikon alikon - change - 21 Mar 2024
Status Pending Ready to Commit
avatar alikon
alikon - comment - 21 Mar 2024

RTC


This comment was created with the J!Tracker Application at issues.joomla.org/tracker/joomla-cms/43055.

avatar Quy Quy - change - 21 Mar 2024
Labels Added: RTC
avatar laoneo laoneo - close - 21 Mar 2024
avatar laoneo laoneo - merge - 21 Mar 2024
avatar laoneo laoneo - change - 21 Mar 2024
Status Ready to Commit Fixed in Code Base
Closed_Date 0000-00-00 00:00:00 2024-03-21 15:01:44
Closed_By laoneo
avatar laoneo
laoneo - comment - 21 Mar 2024

Thanks!

avatar MacJoom
MacJoom - comment - 28 Mar 2024

Hi @brianteeman - we need a Post-Installation Message for the change in the htaccess.txt - as a native speaker could you suggest a message? As we are building the RC release this evening this is urgent. Sorry for the hurry. Please ping me if you are busy. Thank you

avatar brianteeman
brianteeman - comment - 28 Mar 2024

@MacJoom untested but should be ok - #43171

Add a Comment

Login with GitHub to post a comment