summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
Diffstat (limited to '')
-rw-r--r--fixers.py23
1 files changed, 0 insertions, 23 deletions
diff --git a/fixers.py b/fixers.py
deleted file mode 100644
index 624f33f..0000000
--- a/fixers.py
+++ /dev/null
@@ -1,23 +0,0 @@
-from urllib.parse import unquote
-from werkzeug.wrappers import BaseResponse as Response
-
-class ScriptNameFixer(object):
- """Sets SCRIPT_NAME from REQUEST_URI."""
-
- def __init__ (self, app):
- self.app = app
-
- def __call__ (self, environ, start_response):
- uri = unquote(environ['REQUEST_URI']).split('?', 1)[0]
- path = environ['PATH_INFO']
-
- if uri.endswith(path):
- environ['SCRIPT_NAME'] = uri[:-len(path)]
-
- return self.app(environ, start_response)
-
-def EnvironApp(environ, start_response):
- """Returns the WSGI environment as response."""
-
- r = Response(str(environ))
- return r(environ, start_response)