Issue #147 resolved

generators shows no exceptions when using GzipFilter

created an issue

when GzipFilter is added to _cpFilterList '''generators shows no exceptions'''

Here is example code:



from cherrypy import cpg from cherrypy.lib.filter.gzipfilter import GzipFilter

class Page: _cpFilterList = [GzipFilter()] #_cpFilterList = []

def show(self):
    # shows exception as usual
    raise IndexError
    return "Here be dragons" = True

def noshow(self):
    # empty page!
    raise IndexError
    yield "Here be dragons" = True

cpg.root = Page() cpg.server.start() }}}

Comments (5)

  1. Anonymous

    It looks like the exception *is* getting trapped inside of _cphttptools.doRequest, and cpg.response.body at that point is the traceback. I suspect the problem is that the "Content-type: gzip" header is still being output, but the output is no longer zipped.

    Fix might be to force "Content-Type: text/plain" when outputting tracebacks.

  2. Anonymous

    Bah. I meant "Content-encoding" should not be gzip. "Content-type" is already set to text/plain.

  3. Log in to comment