Page 1 of 1

Configuring sab+cherrypy to serve compressed (gzipped) pages?

Posted: December 18th, 2008, 3:17 am
by madwoota
Not sure if this goes under feature requests, bug reports, or just user help, so here goes...

I've noticed that the included config for cherrypy does not enable the (http) server to serve compressed pages dependant on client Accept-Encoding headers (eg: gzip).

So I enabled it. And it broke :D

No idea whether I enabled it properly or not, but what I did was add "'gzip_filter.on': True," to the default_global = { } section in ./cherrypy/config.py and restart sab.

The server started up, and when I brought up the queue page, the response headers DID include the "Content-Encoding: gzip" and "Vary: Accept-Encoding" headers to indicate a compressed page, however the entire content of the response itself became:

Code: Select all

"......HI..Unrecoverable error in the server."
(But it WAS compressed!)

Which seems to indicate that sab can't cope with serving compressed pages? Or did I need to enable something else?
Has anyone even tried to do this before? :)

Hope someone can help ... thanks!

Edit: Er, duh, I'm using sab 0.4.6 (final) and Firefox 3.0.4+Opera 9.5 browsers...

Re: Configuring sab+cherrypy to serve compressed (gzipped) pages?

Posted: December 18th, 2008, 6:24 am
by shypike
We're working on integrating CherryPy-3, which should make this work.
So we won't put much effort in CherryPy-2 issues.

Re: Configuring sab+cherrypy to serve compressed (gzipped) pages?

Posted: December 18th, 2008, 7:01 am
by madwoota
K, no worries.

That sounds like a major-ish change though? Cherrypy 3 targeting 0.5.x or so?
I've noticed the -cp3 branch in svn, so I might have a go at that one/keep an eye on it/see if it even works :)

Cheers.