##// END OF EJS Templates
artifacts: skip vcs detection for artifact downloads.
marcink -
r4475:e9be5c19 default
parent child Browse files
Show More
@@ -139,6 +139,18 b' def is_vcs_call(environ):'
139 139 return False
140 140
141 141
142 def get_path_elem(route_path):
143 if not route_path:
144 return None
145
146 cleaned_route_path = route_path.lstrip('/')
147 if cleaned_route_path:
148 cleaned_route_path_elems = cleaned_route_path.split('/')
149 if cleaned_route_path_elems:
150 return cleaned_route_path_elems[0]
151 return None
152
153
142 154 def detect_vcs_request(environ, backends):
143 155 checks = {
144 156 'hg': (is_hg, SimpleHg),
@@ -146,6 +158,17 b' def detect_vcs_request(environ, backends'
146 158 'svn': (is_svn, SimpleSvn),
147 159 }
148 160 handler = None
161 # List of path views first chunk we don't do any checks
162 white_list = [
163 # e.g /_file_store/download
164 '_file_store'
165 ]
166
167 path_info = environ['PATH_INFO']
168
169 if get_path_elem(path_info) in white_list:
170 log.debug('path `%s` in whitelist, skipping...', path_info)
171 return handler
149 172
150 173 if VCS_TYPE_KEY in environ:
151 174 raw_type = environ[VCS_TYPE_KEY]
General Comments 0
You need to be logged in to leave comments. Login now