diff options
| author | Chris McDonough <chrism@plope.com> | 2011-04-21 21:06:24 -0400 |
|---|---|---|
| committer | Chris McDonough <chrism@plope.com> | 2011-04-21 21:06:24 -0400 |
| commit | 8cf6dd15d512a8c0a4bab9a6b87aa519b8f6d5b3 (patch) | |
| tree | 1129edd8bbe7973791285c689707c6a0585b0688 | |
| parent | 896fb1c8ee3a6059d5c7a111bf8271d80474435b (diff) | |
| download | pyramid-8cf6dd15d512a8c0a4bab9a6b87aa519b8f6d5b3.tar.gz pyramid-8cf6dd15d512a8c0a4bab9a6b87aa519b8f6d5b3.tar.bz2 pyramid-8cf6dd15d512a8c0a4bab9a6b87aa519b8f6d5b3.zip | |
name change
| -rw-r--r-- | pyramid/request.py | 4 | ||||
| -rw-r--r-- | pyramid/static.py | 4 | ||||
| -rw-r--r-- | pyramid/wsgi.py | 5 |
3 files changed, 6 insertions, 7 deletions
diff --git a/pyramid/request.py b/pyramid/request.py index 68eb36863..7bf7c320d 100644 --- a/pyramid/request.py +++ b/pyramid/request.py @@ -394,7 +394,7 @@ def add_global_response_headers(request, headerlist): response.headerlist.append((k, v)) request.add_response_callback(add_headers) -def call_app_subpath_as_path_info(request, app): +def call_app_with_subpath_as_path_info(request, app): # Copy the request. Use the source request's subpath (if it exists) as # the new request's PATH_INFO. Set the request copy's SCRIPT_NAME to the # prefix before the subpath. Call the application with the new request @@ -424,7 +424,6 @@ def call_app_subpath_as_path_info(request, app): new_path_info += '/' # compute new_script_name - tmp = [] workback = (script_name + path_info).split('/') # strip trailing slash from workback to avoid appending undue slash @@ -432,6 +431,7 @@ def call_app_subpath_as_path_info(request, app): if workback and (workback[-1] == ''): workback = workback[:-1] + tmp = [] while workback: if tmp == subpath: break diff --git a/pyramid/static.py b/pyramid/static.py index 22e6e9256..170b027f1 100644 --- a/pyramid/static.py +++ b/pyramid/static.py @@ -13,7 +13,7 @@ from zope.interface import implements from pyramid.asset import resolve_asset_spec from pyramid.interfaces import IStaticURLInfo from pyramid.path import caller_package -from pyramid.request import call_app_subpath_as_path_info +from pyramid.request import call_app_with_subpath_as_path_info from pyramid.url import route_url class PackageURLParser(StaticURLParser): @@ -209,4 +209,4 @@ class static_view(object): self.app = app def __call__(self, context, request): - return call_app_subpath_as_path_info(request, self.app) + return call_app_with_subpath_as_path_info(request, self.app) diff --git a/pyramid/wsgi.py b/pyramid/wsgi.py index 71045bb54..47a89c0eb 100644 --- a/pyramid/wsgi.py +++ b/pyramid/wsgi.py @@ -1,5 +1,5 @@ from pyramid.compat import wraps -from pyramid.request import call_app_subpath_as_path_info +from pyramid.request import call_app_with_subpath_as_path_info def wsgiapp(wrapped): """ Decorator to turn a WSGI application into a :app:`Pyramid` @@ -62,6 +62,5 @@ def wsgiapp2(wrapped): up before the application is invoked. """ def decorator(context, request): - return call_app_subpath_as_path_info(request, wrapped) + return call_app_with_subpath_as_path_info(request, wrapped) return wraps(wrapped)(decorator) - |
