Show More
@@ -17,7 +17,7 b' importlib-metadata==6.0.0' | |||
|
17 | 17 | mercurial==6.3.3 |
|
18 | 18 | mock==5.0.1 |
|
19 | 19 | more-itertools==9.1.0 |
|
20 |
msgpack |
|
|
20 | msgpack==1.0.5 | |
|
21 | 21 | orjson==3.8.7 |
|
22 | 22 | psutil==5.9.4 |
|
23 | 23 | py==1.11.0 |
@@ -57,7 +57,7 b' class HooksHttpClient(object):' | |||
|
57 | 57 | raise |
|
58 | 58 | response = connection.getresponse() |
|
59 | 59 | try: |
|
60 |
return msgpack.load(response |
|
|
60 | return msgpack.load(response) | |
|
61 | 61 | except Exception: |
|
62 | 62 | response_data = response.read() |
|
63 | 63 | log.exception('Failed to decode hook response json data. ' |
@@ -317,7 +317,7 b' class HTTPApplication(object):' | |||
|
317 | 317 | |
|
318 | 318 | def _vcs_view_params(self, request): |
|
319 | 319 | remote = self._remotes[request.matchdict['backend']] |
|
320 |
payload = msgpack.unpackb(request.body, use_list=True |
|
|
320 | payload = msgpack.unpackb(request.body, use_list=True) | |
|
321 | 321 | |
|
322 | 322 | method = payload.get('method') |
|
323 | 323 | params = payload['params'] |
@@ -447,7 +447,7 b' class HTTPApplication(object):' | |||
|
447 | 447 | |
|
448 | 448 | def status_view(self, request): |
|
449 | 449 | import vcsserver |
|
450 | return {'status': 'OK', 'vcsserver_version': str(vcsserver.__version__), | |
|
450 | return {'status': 'OK', 'vcsserver_version': safe_str(vcsserver.__version__), | |
|
451 | 451 | 'pid': os.getpid()} |
|
452 | 452 | |
|
453 | 453 | def service_view(self, request): |
@@ -475,7 +475,7 b' class HTTPApplication(object):' | |||
|
475 | 475 | resp = { |
|
476 | 476 | 'id': payload.get('id'), |
|
477 | 477 | 'result': dict( |
|
478 | version=vcsserver.__version__, | |
|
478 | version=safe_str(vcsserver.__version__), | |
|
479 | 479 | config=server_config, |
|
480 | 480 | app_config=app_config, |
|
481 | 481 | environ=environ, |
@@ -492,7 +492,8 b' class HTTPApplication(object):' | |||
|
492 | 492 | ct = response.content_type |
|
493 | 493 | if ct == response.default_content_type: |
|
494 | 494 | response.content_type = 'application/x-msgpack' |
|
495 | return msgpack.packb(value) | |
|
495 | ||
|
496 | return msgpack.packb(value, use_bin_type=False) | |
|
496 | 497 | return _render |
|
497 | 498 | |
|
498 | 499 | def set_env_from_config(self, environ, config): |
@@ -578,7 +579,7 b' class HTTPApplication(object):' | |||
|
578 | 579 | repo_name = environ['HTTP_X_RC_REPO_NAME'] |
|
579 | 580 | packed_config = base64.b64decode( |
|
580 | 581 | environ['HTTP_X_RC_REPO_CONFIG']) |
|
581 |
config = msgpack.unpackb(packed_config |
|
|
582 | config = msgpack.unpackb(packed_config) | |
|
582 | 583 | |
|
583 | 584 | environ['PATH_INFO'] = environ['HTTP_X_RC_PATH_INFO'] |
|
584 | 585 | self.set_env_from_config(environ, config) |
General Comments 0
You need to be logged in to leave comments.
Login now