Created
May 21, 2013 16:14
-
-
Save denik/5621051 to your computer and use it in GitHub Desktop.
gevent.wsgi extension that adds RAW_REQUEST variable to environ which contains original HTTP request as passed by the client.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
from gevent.wsgi import WSGIHandler as _WSGIHandler, WSGIServer as _WSGIServer | |
class WSGIHandler(_WSGIHandler): | |
format_request = format_request | |
def get_environ(self): | |
environ = _WSGIHandler.get_environ(self) | |
environ['RAW_REQUEST'] = self.path | |
return environ | |
class WSGIServer(_WSGIServer): | |
handler_class = WSGIHandler |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment