Web Server Gateway Interface: Difference between revisions

Content deleted Content added
No edit summary
Fixed typo
Line 10:
The WSGI has two sides: the "[[server (computing)|server]]" or "gateway" side (often the web server like Apache, Nginx), and the "application" or "framework" side (the python script itself). To process a WSGI request, the server side executes the application and provides environment information and a callback function to the application side. The application processes the request, and returns the response to the server side using the callback function it was provided.
 
The So-called ''WSGI [[middleware]]'' sits in the middle of the server and application thus implements both sides of the API. The server after receiving request from a client forwards it to hethe middleware using WSGI, when after processing it sends a request to another WSGI script/application who's response is forwarded to the client via the middleware and ultimately via the server. There maybe multiple middlewares, thus forming a stack of WSGI compliant applications.
 
A "middleware" component can perform such functions as: