##// END OF EJS Templates
vcs: expose more information for http protocol. Increased capabilities with external hooks....
dan -
r4352:122ebfb8 default
parent child Browse files
Show More
@@ -79,6 +79,7 b' class VcsHttpProxy(object):'
79 self._repo_name = repo_name
79 self._repo_name = repo_name
80 self._repo_path = repo_path
80 self._repo_path = repo_path
81 self._config = config
81 self._config = config
82 self.rc_extras = {}
82 log.debug(
83 log.debug(
83 "Creating VcsHttpProxy for repo %s, url %s",
84 "Creating VcsHttpProxy for repo %s, url %s",
84 repo_name, url)
85 repo_name, url)
@@ -87,14 +88,23 b' class VcsHttpProxy(object):'
87 config = msgpack.packb(self._config)
88 config = msgpack.packb(self._config)
88 request = webob.request.Request(environ)
89 request = webob.request.Request(environ)
89 request_headers = request.headers
90 request_headers = request.headers
91
90 request_headers.update({
92 request_headers.update({
91 # TODO: johbo: Remove this, rely on URL path only
93 # TODO: johbo: Remove this, rely on URL path only
92 'X-RC-Repo-Name': self._repo_name,
94 'X-RC-Repo-Name': self._repo_name,
93 'X-RC-Repo-Path': self._repo_path,
95 'X-RC-Repo-Path': self._repo_path,
94 'X-RC-Path-Info': environ['PATH_INFO'],
96 'X-RC-Path-Info': environ['PATH_INFO'],
97
98 'X-RC-Repo-Store': self.rc_extras.get('repo_store'),
99 'X-RC-Server-Config-File': self.rc_extras.get('config'),
100
101 'X-RC-Auth-User': self.rc_extras.get('username'),
102 'X-RC-Auth-User-Id': self.rc_extras.get('user_id'),
103 'X-RC-Auth-User-Ip': self.rc_extras.get('ip'),
104
95 # TODO: johbo: Avoid encoding and put this into payload?
105 # TODO: johbo: Avoid encoding and put this into payload?
96 'X-RC-Repo-Config': base64.b64encode(config),
106 'X-RC-Repo-Config': base64.b64encode(config),
97 'X-RC-Locked-Status-Code': rhodecode.CONFIG.get('lock_ret_code')
107 'X-RC-Locked-Status-Code': rhodecode.CONFIG.get('lock_ret_code'),
98 })
108 })
99
109
100 method = environ['REQUEST_METHOD']
110 method = environ['REQUEST_METHOD']
General Comments 0
You need to be logged in to leave comments. Login now