brotli: set header to timeout if timeout was immmediate (0)

This commit is contained in:
codl 2017-09-21 09:51:59 +02:00
parent 0e185c67a5
commit a649d21549
No known key found for this signature in database
GPG Key ID: 6CD7C8891ED1233A
1 changed files with 2 additions and 2 deletions

View File

@ -44,8 +44,8 @@ class BrotliCache(object):
if self.timeout > 0:
t.join(self.timeout)
encbody = self.redis.get(cache_key)
if not encbody:
response.headers.set('x-brotli-cache', 'TIMEOUT')
if not encbody:
response.headers.set('x-brotli-cache', 'TIMEOUT')
else:
response.headers.set('x-brotli-cache', 'LOCKED')
if encbody: