Mercurial > public > mercurial-scm > hg-stable
comparison mercurial/hgweb/protocol.py @ 33228:35c233975b78
configitems: register the 'server.zliblevel' config
author | Pierre-Yves David <pierre-yves.david@octobus.net> |
---|---|
date | Fri, 30 Jun 2017 03:44:16 +0200 |
parents | e75463e3179f |
children | 3c91cc0c5fde |
comparison
equal
deleted
inserted
replaced
33227:86c9aa1d598f | 33228:35c233975b78 |
---|---|
133 # legacy protocol. | 133 # legacy protocol. |
134 | 134 |
135 # Don't allow untrusted settings because disabling compression or | 135 # Don't allow untrusted settings because disabling compression or |
136 # setting a very high compression level could lead to flooding | 136 # setting a very high compression level could lead to flooding |
137 # the server's network or CPU. | 137 # the server's network or CPU. |
138 opts = {'level': self.ui.configint('server', 'zliblevel', -1)} | 138 opts = {'level': self.ui.configint('server', 'zliblevel')} |
139 return HGTYPE, util.compengines['zlib'], opts | 139 return HGTYPE, util.compengines['zlib'], opts |
140 | 140 |
141 def iscmd(cmd): | 141 def iscmd(cmd): |
142 return cmd in wireproto.commands | 142 return cmd in wireproto.commands |
143 | 143 |