##// END OF EJS Templates
artifacts: skip vcs detection for artifact downloads.
marcink -
r4475:e9be5c19 default
parent child
Show More
@@ -139,6 +139,18 def is_vcs_call(environ):
139 return False
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 def detect_vcs_request(environ, backends):
154 def detect_vcs_request(environ, backends):
143 checks = {
155 checks = {
144 'hg': (is_hg, SimpleHg),
156 'hg': (is_hg, SimpleHg),
@@ -146,6 +158,17 def detect_vcs_request(environ, backends
146 'svn': (is_svn, SimpleSvn),
158 'svn': (is_svn, SimpleSvn),
147 }
159 }
148 handler = None
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 if VCS_TYPE_KEY in environ:
173 if VCS_TYPE_KEY in environ:
151 raw_type = environ[VCS_TYPE_KEY]
174 raw_type = environ[VCS_TYPE_KEY]
General Comments 0
You need to be logged in to leave comments. Login now