Show More
@@ -88,14 +88,8 b' class webproto(wireproto.abstractserverp' | |||||
88 | # Don't allow untrusted settings because disabling compression or |
|
88 | # Don't allow untrusted settings because disabling compression or | |
89 | # setting a very high compression level could lead to flooding |
|
89 | # setting a very high compression level could lead to flooding | |
90 | # the server's network or CPU. |
|
90 | # the server's network or CPU. | |
91 |
|
|
91 | opts = {'level': self.ui.configint('server', 'zliblevel', -1)} | |
92 | for chunk in chunks: |
|
92 | return util.compengines['zlib'].compressstream(chunks, opts) | |
93 | data = z.compress(chunk) |
|
|||
94 | # Not all calls to compress() emit data. It is cheaper to inspect |
|
|||
95 | # that here than to send it via the generator. |
|
|||
96 | if data: |
|
|||
97 | yield data |
|
|||
98 | yield z.flush() |
|
|||
99 |
|
93 | |||
100 | def _client(self): |
|
94 | def _client(self): | |
101 | return 'remote:%s:%s:%s' % ( |
|
95 | return 'remote:%s:%s:%s' % ( |
General Comments 0
You need to be logged in to leave comments.
Login now