# HG changeset patch # User Martin Bornhold # Date 2016-10-10 11:58:52 # Node ID ed0fd60ba67705e3a07a2d17fd532148c48365e1 # Parent 6b914df0a1ce509969ee1b3389ad06cef54e1c84 vcs: Include reason phrase from VCSServer into HTTP status string. diff --git a/rhodecode/lib/middleware/utils/scm_app_http.py b/rhodecode/lib/middleware/utils/scm_app_http.py --- a/rhodecode/lib/middleware/utils/scm_app_http.py +++ b/rhodecode/lib/middleware/utils/scm_app_http.py @@ -80,8 +80,6 @@ class VcsHttpProxy(object): repo_name, url) def __call__(self, environ, start_response): - status = '200 OK' - config = msgpack.packb(self._config) request = webob.request.Request(environ) request_headers = request.headers @@ -115,8 +113,11 @@ class VcsHttpProxy(object): if not wsgiref.util.is_hop_by_hop(h) ] - # TODO: johbo: Better way to get the status including text? - status = str(response.status_code) + # Build status argument for start_reponse callable. + status = '{status_code} {reason_phrase}'.format( + status_code=response.status_code, + reason_phrase=response.reason) + start_response(status, response_headers) return _maybe_stream(response)