Show More
@@ -89,10 +89,6 b' class SimpleSvnApp(object):' | |||||
89 | if h.lower() not in self.IGNORED_HEADERS |
|
89 | if h.lower() not in self.IGNORED_HEADERS | |
90 | ] |
|
90 | ] | |
91 |
|
91 | |||
92 | # Add custom response header to indicate that this is a VCS response |
|
|||
93 | # and which backend is used. |
|
|||
94 | headers.append(('X-RhodeCode-Backend', 'svn')) |
|
|||
95 |
|
||||
96 | return headers |
|
92 | return headers | |
97 |
|
93 | |||
98 |
|
94 |
@@ -116,10 +116,6 b' class VcsHttpProxy(object):' | |||||
116 | if not wsgiref.util.is_hop_by_hop(h) |
|
116 | if not wsgiref.util.is_hop_by_hop(h) | |
117 | ] |
|
117 | ] | |
118 |
|
118 | |||
119 | # Add custom response header to indicate that this is a VCS response |
|
|||
120 | # and which backend is used. |
|
|||
121 | response_headers.append(('X-RhodeCode-Backend', self._backend)) |
|
|||
122 |
|
||||
123 | # TODO: johbo: Better way to get the status including text? |
|
119 | # TODO: johbo: Better way to get the status including text? | |
124 | status = str(response.status_code) |
|
120 | status = str(response.status_code) | |
125 | start_response(status, response_headers) |
|
121 | start_response(status, response_headers) |
@@ -94,10 +94,6 b' class RemoteAppCaller(object):' | |||||
94 | data, status, headers = self._remote_wsgi.handle( |
|
94 | data, status, headers = self._remote_wsgi.handle( | |
95 | clean_environ, input_data, *self._args, **self._kwargs) |
|
95 | clean_environ, input_data, *self._args, **self._kwargs) | |
96 |
|
96 | |||
97 | # Add custom response header to indicate that this is a VCS response |
|
|||
98 | # and which backend is used. |
|
|||
99 | headers.append(('X-RhodeCode-Backend', self._backend)) |
|
|||
100 |
|
||||
101 | log.debug("Got result from proxy, returning to WSGI container") |
|
97 | log.debug("Got result from proxy, returning to WSGI container") | |
102 | start_response(status, headers) |
|
98 | start_response(status, headers) | |
103 |
|
99 |
@@ -157,7 +157,6 b' class TestSimpleSvnApp(object):' | |||||
157 | expected_headers = [ |
|
157 | expected_headers = [ | |
158 | ('MS-Author-Via', 'DAV'), |
|
158 | ('MS-Author-Via', 'DAV'), | |
159 | ('SVN-Supported-Posts', 'create-txn-with-props'), |
|
159 | ('SVN-Supported-Posts', 'create-txn-with-props'), | |
160 | ('X-RhodeCode-Backend', 'svn'), |
|
|||
161 | ] |
|
160 | ] | |
162 | response_headers = self.app._get_response_headers(headers) |
|
161 | response_headers = self.app._get_response_headers(headers) | |
163 | assert sorted(response_headers) == sorted(expected_headers) |
|
162 | assert sorted(response_headers) == sorted(expected_headers) | |
@@ -192,7 +191,6 b' class TestSimpleSvnApp(object):' | |||||
192 | expected_response_headers = [ |
|
191 | expected_response_headers = [ | |
193 | ('SVN-Supported-Posts', 'create-txn-with-props'), |
|
192 | ('SVN-Supported-Posts', 'create-txn-with-props'), | |
194 | ('MS-Author-Via', 'DAV'), |
|
193 | ('MS-Author-Via', 'DAV'), | |
195 | ('X-RhodeCode-Backend', 'svn'), |
|
|||
196 | ] |
|
194 | ] | |
197 | request_mock.assert_called_once_with( |
|
195 | request_mock.assert_called_once_with( | |
198 | self.environment['REQUEST_METHOD'], expected_url, |
|
196 | self.environment['REQUEST_METHOD'], expected_url, |
General Comments 0
You need to be logged in to leave comments.
Login now