fix(git): fixed issues with gzip detection for git protocol
This commit is contained in:
parent
2557f18da5
commit
2f7467e347
1 changed files with 3 additions and 2 deletions
|
|
@ -31,6 +31,7 @@ from rhodecode.lib.middleware.appenlight import wrap_in_appenlight_if_enabled
|
|||
from rhodecode.lib.middleware.simplegit import SimpleGit, GIT_PROTO_PAT
|
||||
from rhodecode.lib.middleware.simplehg import SimpleHg
|
||||
from rhodecode.lib.middleware.simplesvn import SimpleSvn
|
||||
from rhodecode.lib.str_utils import safe_str
|
||||
from rhodecode.model.settings import VcsSettingsModel
|
||||
|
||||
|
||||
|
|
@ -108,9 +109,9 @@ class GunzipMiddleware(object):
|
|||
self.app = application
|
||||
|
||||
def __call__(self, environ, start_response):
|
||||
accepts_encoding_header = environ.get('HTTP_CONTENT_ENCODING', b'')
|
||||
accepts_encoding_header = safe_str(environ.get('HTTP_CONTENT_ENCODING', ''))
|
||||
|
||||
if b'gzip' in accepts_encoding_header:
|
||||
if 'gzip' in accepts_encoding_header:
|
||||
log.debug('gzip detected, now running gunzip wrapper')
|
||||
wsgi_input = environ['wsgi.input']
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue