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/html',
|
||||||
'text/plain',
|
'text/plain',
|
||||||
'text/xml',
|
'text/xml',
|
||||||
|
'text/x-wiki',
|
||||||
'application/json',
|
'application/json',
|
||||||
'application/xhtml+xml',
|
'application/xhtml+xml',
|
||||||
'application/x-javascript',
|
'application/x-javascript',
|
||||||
|
@ -399,9 +400,9 @@ class KVCache(Cache):
|
||||||
if value == 'headers':
|
if value == 'headers':
|
||||||
r = info['headers']
|
r = info['headers']
|
||||||
else:
|
else:
|
||||||
data = self.backend.get(data_key)
|
r = self.backend.get(data_key)
|
||||||
if data:
|
if r and info['compressed']:
|
||||||
r = zlib.decompress(data)
|
r = zlib.decompress(r)
|
||||||
return r
|
return r
|
||||||
|
|
||||||
def delete(self, url, data=None, headers=None):
|
def delete(self, url, data=None, headers=None):
|
||||||
|
|
Loading…
Reference in a new issue