Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Name collision with br(azilian) language on php-fpm? #13

Open
maniac0s opened this issue Oct 26, 2018 · 1 comment
Open

Name collision with br(azilian) language on php-fpm? #13

maniac0s opened this issue Oct 26, 2018 · 1 comment

Comments

@maniac0s
Copy link

maniac0s commented Oct 26, 2018

For some reason I need to remove Brazilian language from mime.conf when using brotli.so with php-fpm so it doesn't get send as content-language br

When I have in my mime.conf:
AddLanguage .br

And add br compression for .css to Drupal, I get the following response headers for the aggregated .css (and only the headers that are aggregated by php in Drupal):

accept-ranges: bytes
cache-control: max-age=31449600, no-transform, public, immutable
content-encoding: br
content-language: br
content-length: 1891
content-type: text/css
date: Fri, 26 Oct 2018 11:50:11 GMT
expires: Fri, 25 Oct 2019 11:50:11 GMT
last-modified: Fri, 26 Oct 2018 11:45:05 GMT
server: Apache
status: 200
vary: Accept-Encoding

when I add RemoveLanguage br to mime.config, the content-language header field disappears.

The encoding works however it doesn't seem to make sense to have a content-language br for css files just because I deliver brotli.

@kjdev
Copy link
Owner

kjdev commented Nov 26, 2018

We have implemented an experimental output handler with version 0.6.0

<?php
ini_set('brotli.output_compression', 'On');

echo ...;

Request Header

Accept-Encoding: gzip, deflate, br

Response Header

Content-Encoding: br
Vary: Accept-Encoding
Transfer-Encoding: chunked
Server: nginx/1.12.1
X-Powered-By: PHP/7.2.12

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants