Contentbox, Railo and this.compression = true;

Hello,

we had a serious problem with this setting enabled, I think it is more Railo related, but I would like to let you know anyhow.

With our new site we had a few customers complaining that they just see a white page. Nothing no code, no error, not even
in Apache. We could not reproduce this error for a long time.

Apache had gzip enabled and Application.cfc of Contentbox comes with this default setting: this.compression = true;

Finally we found that the customers proxy servers asked for non gzipped content, but the response was gzipped anyhow.
So we changed Apache config that Apache is taking care for gzipping and set in Contentbox Root Application.cfc

`
this.compression = false;

`

We are running Railo 4.3 which is an unofficial build with multiple ORM datasources

We have tested this behavior with free proxy servers like: 1freeproxyserver.com

I would be interested if anybody can reproduce this.

Best regards,

Gunnar

Gunnar,

You are right, I am disabling this and letting the user turn on at their own leisure.

Luis Majano
CEO
Ortus Solutions, Corp
www.ortussolutions.com
P/F: 1-888-557-8057
Direct: (909) 248-3408

ColdBox Platform: http://www.coldbox.org

ContentBox Platform: http://www.gocontentbox.org
Linked In: http://www.linkedin.com/pub/3/731/483

Social: twitter.com/ortussolutions | twitter.com/coldbox | twitter.com/lmajano | twitter.com/gocontentbox

https://ortussolutions.atlassian.net/browse/CONTENTBOX-579

Luis Majano
CEO
Ortus Solutions, Corp
www.ortussolutions.com
P/F: 1-888-557-8057
Direct: (909) 248-3408

ColdBox Platform: http://www.coldbox.org

ContentBox Platform: http://www.gocontentbox.org
Linked In: http://www.linkedin.com/pub/3/731/483

Social: twitter.com/ortussolutions | twitter.com/coldbox | twitter.com/lmajano | twitter.com/gocontentbox

Gunnar, HTTP clients are supposed to report via an HTTP header what forms of compression (if any) they support. Can you confirm what the incoming headers are? I assume this is an issue of the compression code not checking the headers and just assuming the client can handle compression. (All modern browsers can)

To clarify, is this compression a Railo feature of a ContentBox feature?

Thanks!

~Brad

ColdBox Platform Evangelist
Ortus Solutions, Corp

E-mail: brad@coldbox.org
ColdBox Platform: http://www.coldbox.org
Blog: http://www.codersrevolution.com

Brad,

the request header the proxy sends is:

Accept:
text/html

So there is no:
Accept-Encoding: gzip, deflate, sdch

Response Header is:

  1. Content-Encoding:
    gzip

Compression setting is in:
ContentBox/Application.cfc at master · Ortus-Solutions/ContentBox · GitHub line 38

Best regards,

Gunnar

Ahh, so this is a Railo feature then. I quick Google shows this is a known bug in Railo where it apparently just returns a blank page when not header is provided.

https://issues.jboss.org/browse/RAILO-3082

Reported last May by Markus Schneebeli.

Turning that off by default will at least ‘work around’ the issue but it sounds like some pressure is needed on the Railo guys to get a fix in for it. Another work around would be to try and force your proxy to include a header stating it doesn’t accept GZip content as it appears Railo “behaves” when the header is present.

Thanks!

~Brad

ColdBox Platform Evangelist
Ortus Solutions, Corp

E-mail: brad@coldbox.org
ColdBox Platform: http://www.coldbox.org
Blog: http://www.codersrevolution.com

Hmm, interesting update on this-- I checked the spec on “Accept-Encoding” and it actually appears that a lack of the header all together does allow the server to assume the client supports anything.

http://www.w3.org/Protocols/rfc2616/rfc2616-sec14.html
"If no Accept-Encoding field is present in a request, the server MAY assume that the client will accept any content coding"

Of course, it’s still a bug that Railo returns a blank response (if that is in fact what it is doing). Apparently, a GZipped response would actually be appropriate though. If Railo gets updated to follow the RFC AND your proxy does not support GZIP, the remaining issue would actually be with your proxy to send the appropriate header to signify what it does and does not support.

Thanks!

~Brad

ColdBox Platform Evangelist
Ortus Solutions, Corp

E-mail: brad@coldbox.org
ColdBox Platform: http://www.coldbox.org
Blog: http://www.codersrevolution.com