summaryrefslogtreecommitdiff
path: root/paste
diff options
context:
space:
mode:
authorianb <devnull@localhost>2005-12-18 21:30:27 +0000
committerianb <devnull@localhost>2005-12-18 21:30:27 +0000
commit4f3e0083b010a2e90b95ef1563bb06db45ad026b (patch)
tree58d9ddc0bc585916432f21da6cc2fd7a0fafc965 /paste
parentd338677fe8c4b468ad89caf5998c73e290d7b49b (diff)
downloadpaste-4f3e0083b010a2e90b95ef1563bb06db45ad026b.tar.gz
Moved all the internal uses of wsgilib to their correct forms now
Diffstat (limited to 'paste')
-rw-r--r--paste/httpexceptions.py3
-rw-r--r--paste/profilemiddleware.py9
-rw-r--r--paste/urlparser.py4
3 files changed, 9 insertions, 7 deletions
diff --git a/paste/httpexceptions.py b/paste/httpexceptions.py
index 95fa5cf..0180925 100644
--- a/paste/httpexceptions.py
+++ b/paste/httpexceptions.py
@@ -71,7 +71,8 @@ Exception
import types
import sys
-from wsgilib import has_header, header_value, catch_errors_app
+from wsgilib import catch_errors_app
+from response import has_header, header_value
from util.quoting import strip_html, html_quote
class HTTPException(Exception):
diff --git a/paste/profilemiddleware.py b/paste/profilemiddleware.py
index 43d8dca..07294ed 100644
--- a/paste/profilemiddleware.py
+++ b/paste/profilemiddleware.py
@@ -10,6 +10,7 @@ import cgi
import time
from cStringIO import StringIO
from paste import wsgilib
+from paste import response
__all__ = ['ProfileMiddleware', 'profile_decorator']
@@ -44,10 +45,10 @@ class ProfileMiddleware(object):
self.limit = limit
def __call__(self, environ, start_response):
- response = []
+ catch_response = []
body = []
def replace_start_response(status, headers):
- response.extend([status, headers])
+ catch_response.extend([status, headers])
start_response(status, headers)
return body.append
def run_app():
@@ -61,8 +62,8 @@ class ProfileMiddleware(object):
finally:
prof.close()
body = ''.join(body)
- headers = response[1]
- content_type = wsgilib.header_value(headers, 'content-type')
+ headers = catch_response[1]
+ content_type = response.header_value(headers, 'content-type')
if not content_type.startswith('text/html'):
# We can't add info to non-HTML output
return [body]
diff --git a/paste/urlparser.py b/paste/urlparser.py
index 9d43a1a..17c2fef 100644
--- a/paste/urlparser.py
+++ b/paste/urlparser.py
@@ -335,7 +335,7 @@ def make_directory(parser, environ, filename):
URLParser.register_constructor('dir', make_directory)
def make_unknown(parser, environ, filename):
- return wsgilib.send_file(filename)
+ return fileapp.FileApp(filename)
URLParser.register_constructor('*', make_unknown)
@@ -431,7 +431,7 @@ class StaticURLParser(object):
return self.__class__(full)(environ, start_response)
if environ.get('PATH_INFO') and environ.get('PATH_INFO') != '/':
return self.error_extra_path(environ, start_response)
- return wsgilib.send_file(full)(environ, start_response)
+ return fileapp.FileApp(full)(environ, start_response)
def add_slash(self, environ, start_response):
"""