diff options
author | René 'Necoro' Neumann <necoro@necoro.eu> | 2020-06-07 16:47:10 +0200 |
---|---|---|
committer | René 'Necoro' Neumann <necoro@necoro.eu> | 2020-06-07 16:47:10 +0200 |
commit | 110f276a54cedaa8ed6f072fc483dd78cf21d2c2 (patch) | |
tree | 557add186009ff7f96d47e8ed6dff9c67927061a | |
parent | 4bcc561f545803db68b66a36f3daca3d46561c5f (diff) | |
download | kosten-110f276a54cedaa8ed6f072fc483dd78cf21d2c2.tar.gz kosten-110f276a54cedaa8ed6f072fc483dd78cf21d2c2.tar.bz2 kosten-110f276a54cedaa8ed6f072fc483dd78cf21d2c2.zip |
Removed unneeded fixers
Diffstat (limited to '')
-rw-r--r-- | fixers.py | 23 |
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) |