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

Unsupported Content-Coding: none #2619

Closed
JFossey opened this issue Aug 12, 2019 · 7 comments
Closed

Unsupported Content-Coding: none #2619

JFossey opened this issue Aug 12, 2019 · 7 comments

Comments

@JFossey
Copy link

JFossey commented Aug 12, 2019

Hi,

I have recently revamped a pre-existing website developed in Yii using GravCMS.

When I have look to test the site using using tools like W3C validator and Chrome dev tools I get and error "Unsupported Content-Coding: none".

When I look into this issue I find Content-Encoding header can take only five values: gzip, compress, deflate, identity, br. The “none” is therefore an invalid value.

Ref:

@JFossey
Copy link
Author

JFossey commented Aug 12, 2019

Just to follow up on this, the only workaround I found thus far is the following settings.

  • Gzip compression = YES
  • Allow WebServer Gzip = NO

@rhukster
Copy link
Member

Thanks for researching this. I am going to add this to the troubleshooting section of the learn site.

@mahagr
Copy link
Member

mahagr commented Aug 14, 2019

The issue is caused by this line:

https://github.com/getgrav/grav/blob/develop/system/src/Grav/Common/Grav.php#L442

I think there was a reason why we ended up using none as the value; I think it prevents webserver from compressing the request.

@JFossey
Copy link
Author

JFossey commented Aug 14, 2019

I looked for an alternative way of preventing gzip compression and found the following.
Hope it helps. The apache set env looks promising for many common setups.

function disable_gzip() {
	@ini_set('zlib.output_compression', 'Off');
	@ini_set('output_buffering', 'Off');
	@ini_set('output_handler', '');
	@apache_setenv('no-gzip', 1);	
}

@mahagr mahagr self-assigned this Dec 13, 2019
@mahagr
Copy link
Member

mahagr commented Mar 19, 2020

@JFossey Can you test out the change?

@JFossey
Copy link
Author

JFossey commented Mar 26, 2020

@mahagr I have not yet tested it out, but I will, it just might be a while before I get round to this.

@JFossey
Copy link
Author

JFossey commented May 9, 2020

@mahagr This seems to work as intended, thank you.

@mahagr mahagr closed this as completed Jun 29, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

4 participants
@mahagr @rhukster @JFossey and others