Lines Matching refs:url
4 Map URL prefixes to WSGI applications. See ``URLMap``
80 of several applications based on the URL.
83 ``PATH_INFO.startswith(url)``), and the values are applications to
85 URL first. The ``SCRIPT_NAME`` and ``PATH_INFO`` environmental
125 def normalize_url(self, url, trim=True):
126 if isinstance(url, (list, tuple)):
127 domain = url[0]
128 url = self.normalize_url(url[1])[1]
129 return domain, url
130 assert (not url or url.startswith('/')
131 or self.domain_url_re.search(url)), (
132 "URL fragments must start with / or http:// (you gave %r)" % url)
133 match = self.domain_url_re.search(url)
135 url = url[match.end():]
136 if '/' in url:
137 domain, url = url.split('/', 1)
138 url = '/' + url
140 domain, url = url, ''
143 url = self.norm_url_re.sub('/', url)
145 url = url.rstrip('/')
146 return domain, url
153 (domain, url), app = app_desc
156 return '\xff', -len(url)
158 return domain, -len(url)
163 def __setitem__(self, url, app):
166 del self[url]
170 dom_url = self.normalize_url(url)
176 def __getitem__(self, url):
177 dom_url = self.normalize_url(url)
182 "No application with the url %r (domain: %r; existing: %s)"
183 % (url[1], url[0] or '*', self.applications))
185 def __delitem__(self, url):
186 url = self.normalize_url(url)
188 if app_url == url:
193 "No application with the url %r" % (url,))
232 `base_paste_url` is the URL under which all applications added through
243 def __setitem__(self, url, app):
247 url = self.map.normalize_url(url)
250 url = (url[0] or self.base_paste_url[0],
251 self.base_paste_url[1] + url[1])
252 self.map[url] = app