##// END OF EJS Templates
fix(git): fixed issues with gzip detection for git protocol
super-admin -
r5229:d12cacc8 default
parent child Browse files
Show More
@@ -31,6 +31,7 b' from rhodecode.lib.middleware.appenlight'
31 from rhodecode.lib.middleware.simplegit import SimpleGit, GIT_PROTO_PAT
31 from rhodecode.lib.middleware.simplegit import SimpleGit, GIT_PROTO_PAT
32 from rhodecode.lib.middleware.simplehg import SimpleHg
32 from rhodecode.lib.middleware.simplehg import SimpleHg
33 from rhodecode.lib.middleware.simplesvn import SimpleSvn
33 from rhodecode.lib.middleware.simplesvn import SimpleSvn
34 from rhodecode.lib.str_utils import safe_str
34 from rhodecode.model.settings import VcsSettingsModel
35 from rhodecode.model.settings import VcsSettingsModel
35
36
36
37
@@ -108,9 +109,9 b' class GunzipMiddleware(object):'
108 self.app = application
109 self.app = application
109
110
110 def __call__(self, environ, start_response):
111 def __call__(self, environ, start_response):
111 accepts_encoding_header = environ.get('HTTP_CONTENT_ENCODING', b'')
112 accepts_encoding_header = safe_str(environ.get('HTTP_CONTENT_ENCODING', ''))
112
113
113 if b'gzip' in accepts_encoding_header:
114 if 'gzip' in accepts_encoding_header:
114 log.debug('gzip detected, now running gunzip wrapper')
115 log.debug('gzip detected, now running gunzip wrapper')
115 wsgi_input = environ['wsgi.input']
116 wsgi_input = environ['wsgi.input']
116
117
General Comments 0
You need to be logged in to leave comments. Login now