compress wiki text, only decompress if compressed
This commit is contained in:
parent
1dc2788c25
commit
dc2eaccd92
1 changed files with 4 additions and 3 deletions
|
@ -32,6 +32,7 @@ COMPRESS_TYPES = (
|
|||
'text/html',
|
||||
'text/plain',
|
||||
'text/xml',
|
||||
'text/x-wiki',
|
||||
'application/json',
|
||||
'application/xhtml+xml',
|
||||
'application/x-javascript',
|
||||
|
@ -399,9 +400,9 @@ class KVCache(Cache):
|
|||
if value == 'headers':
|
||||
r = info['headers']
|
||||
else:
|
||||
data = self.backend.get(data_key)
|
||||
if data:
|
||||
r = zlib.decompress(data)
|
||||
r = self.backend.get(data_key)
|
||||
if r and info['compressed']:
|
||||
r = zlib.decompress(r)
|
||||
return r
|
||||
|
||||
def delete(self, url, data=None, headers=None):
|
||||
|
|
Loading…
Reference in a new issue