##// END OF EJS Templates
chore(code): small code improvements logging & stricter header checks
super-admin -
r5553:b90185f7 default
parent child Browse files
Show More
@@ -167,7 +167,8 b' def _is_request_chunked(environ):'
167 def _maybe_stream_request(environ):
167 def _maybe_stream_request(environ):
168 path = get_path_info(environ)
168 path = get_path_info(environ)
169 stream = _is_request_chunked(environ)
169 stream = _is_request_chunked(environ)
170 log.debug('handling request `%s` with stream support: %s', path, stream)
170 req_method = environ['REQUEST_METHOD']
171 log.debug('handling scm request: %s `%s` with stream support: %s', req_method, path, stream)
171
172
172 if stream:
173 if stream:
173 # set stream by 256k
174 # set stream by 256k
@@ -42,7 +42,7 b' class UpdateModel(BaseModel):'
42 ver = rhodecode.__version__
42 ver = rhodecode.__version__
43 log.debug('Checking for upgrade on `%s` server', update_url)
43 log.debug('Checking for upgrade on `%s` server', update_url)
44 opener = urllib.request.build_opener()
44 opener = urllib.request.build_opener()
45 opener.addheaders = [('User-agent', 'RhodeCode-SCM/%s' % ver)]
45 opener.addheaders = [('User-agent', f'RhodeCode-SCM/{ver.strip()}')]
46 response = opener.open(update_url)
46 response = opener.open(update_url)
47 response_data = response.read()
47 response_data = response.read()
48 data = json.loads(response_data)
48 data = json.loads(response_data)
General Comments 0
You need to be logged in to leave comments. Login now