Skip to content

Static files served by 'tools.staticdir' cause decompression errors in browsers when both 'tools.gzip' and 'tools.caching' are on, but only when served from the cache. #1190

Closed
@ghost

Description

Originally reported by: Michiel Overtoom (Bitbucket: MichielOvertoom, GitHub: @motoom)


I think I found a bug when both 'tools.gzip' and 'tools.caching' are on, for static files served by 'tools.staticdir'. Static content is placed uncompressed in the cache, but incorrectly marked as compressed, and the
result is that only the first serving is send correctly compressed to the client. Subsequent requests cause errors in the browser.

By the way, no exceptions are thrown by CherryPy.

I have attached a small test program which demonstrates this problem. Reloading the static file in the browser should produce the problem.


Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions