在 Grok - Zope - PasteScript 环境中启用 gzip 压缩
我正在尝试让我的服务器发送压缩数据。我有一个在 Paste 上运行的 grok 应用程序(Paste-1.7.2-py2.4.egg)
我一直在尝试谷歌搜索如何使所有环境在 gzip 中提供数据......但没有成功......我认为答案来自 http://pythonpaste.org/modules/gzipper.html 但如果我这样做:
[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
它似乎没有做任何事情...
提前谢谢您!
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!
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
好吧...我要回答自己...
事实证明,按照我在问题中详细说明的方式修改 .ini 文件确实激活了 gzip 压缩。
我认为它没有做任何事情,因为我相信 Google Chrome 的开发人员工具审核所说的内容......所说的审核仍然告诉我激活 gzip 压缩以提高网站的性能,但事实证明(通过查看网络)流量)被激活(并且审核是错误的)
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)