##// 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 79 self._repo_name = repo_name
80 80 self._repo_path = repo_path
81 81 self._config = config
82 self.rc_extras = {}
82 83 log.debug(
83 84 "Creating VcsHttpProxy for repo %s, url %s",
84 85 repo_name, url)
@@ -87,14 +88,23 b' class VcsHttpProxy(object):'
87 88 config = msgpack.packb(self._config)
88 89 request = webob.request.Request(environ)
89 90 request_headers = request.headers
91
90 92 request_headers.update({
91 93 # TODO: johbo: Remove this, rely on URL path only
92 94 'X-RC-Repo-Name': self._repo_name,
93 95 'X-RC-Repo-Path': self._repo_path,
94 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 105 # TODO: johbo: Avoid encoding and put this into payload?
96 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 110 method = environ['REQUEST_METHOD']
General Comments 0
You need to be logged in to leave comments. Login now