WSGIProxy

WSGIProxy turns WSGI function calls into HTTP requests.
Download

WSGIProxy Ranking & Summary

Advertisement

  • Rating:
  • License:
  • GPL
  • Publisher Name:
  • Ian Bicking and Contributors
  • Publisher web site:
  • Operating Systems:
  • Linux
  • File Size:
  • 16KB

WSGIProxy Tags


WSGIProxy Description

WSGI turns HTTP requests into WSGI function calls. WSGIProxy turns WSGI function calls into HTTP requests. It also includes code to sign requests and pass private data, and to spawn subprocesses to handle requests. WSGIProxy is part of the Paste project. Discussion can go on the Paste list and issues into the Paste trac instance. Features The primary feature in WSGIProxy is wsgiproxy.exactproxy, which takes a WSGI request and sends it to a website, returning the HTTP response as a WSGI response. This function uses the WSGI request itself to determine where to send the request (e.g., environ). Note that this function does not add any of the normal headers like X-Forwarded-For. The modules wsgiproxy.app and wsgiproxy.middleware offer a way of passing a WSGI request from one server to another, preserving more of the information in a WSGI request. It adds the standard headers (like X-Forwarded-For) but can also add other headers. These modules allow you to preserve things like SCRIPT_NAME and PATH_INFO, as well as other select keys so long as they are somehow serializable (up to pickling, though strings are less error-prone, like environ). Requests can be signed to ensure this private line of communication isn’t intercepted. The module wsgiproxy.spawn is a process MANAGER. When a request first comes in a new process will be spun up to handle the request, which is passed over HTTP. When the server STOPS the subprocess will be stopped, and after a period of inactivity it can also Shut Down the subprocess. Subprocesses do not need to use the same Python interpreter, or use Python at all.


WSGIProxy Related Software