开发者

Enable gzip compression in a Grok - Zope - PasteScript environment

I am trying to make my server send gzipped data. I have a grok application that runs over Paste (Paste-1.7.2-py2.4.egg)

I have been trying to google how to make all that environment to serve data in gzip... But without success... I think the answer comes in http://pythonpaste.org/modules/gzipper.html but if I do this:

    [app:myAppsName]
    use = egg:grokserver
    filter-with = translogger
    filter-with = fileupload
    filter-with = gzip

    [filter:fileupload]
    use = egg:grokserver#fileupload

    [filter:gzip]
    use = egg:Paste#gzip

    [server:main]
    use = egg:Paste#http
    host = 0.0.0.0    
    port = 8080

it doesn't 开发者_运维百科seem to do anything...

Thank you in advance!


Well... I am going to reply to myself...

It turns out that modifying the .ini files in the way I detailed in my question was, indeed, activating the gzip compression.

I thought that it wasn't doing anything because I believed what the Google Chrome's Developer Tools audits were saying... Said audits were still telling me to activate the gzip compression to improve the site's performance, but it turned out (by seeing the network traffic) that is was activated (and the audits were wrong)

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜