diff options
| author | Eric Searcy | 2015-07-29 19:16:50 -0700 |
|---|---|---|
| committer | Barry Warsaw | 2017-02-10 11:58:53 -0500 |
| commit | 7cd3d7e9022a614ef424c266f542c1e5ea52666e (patch) | |
| tree | 7f9f4320bd988271e70a06a7314fb728bad460c8 /src/mailman/rest/wsgiapp.py | |
| parent | 2a4cade68d4d77c6107e090a39fad4a3011ee81d (diff) | |
| download | mailman-7cd3d7e9022a614ef424c266f542c1e5ea52666e.tar.gz mailman-7cd3d7e9022a614ef424c266f542c1e5ea52666e.tar.zst mailman-7cd3d7e9022a614ef424c266f542c1e5ea52666e.zip | |
Update WSGI functions to take necessary arguments
* gunicorn.py needs to initialize mailman once, not per request.
* make_application takes environment and response arguments, which it passes to
the callable WSGI application (in this case, the instance of the RootedAPI
class). (wsgiref does something similar, but wsgi_server only needs a copy
of the application, and it passes the same two arguments to that object
internally.
Note, in my opinion wsgiapp.py's make_application has a misleading name, since
it doesn't behave like a normal make_application (it's not invoked by a WSGI
server). I've left it as-is, though, since it is public.
Diffstat (limited to '')
| -rw-r--r-- | src/mailman/rest/wsgiapp.py | 6 |
1 files changed, 1 insertions, 5 deletions
diff --git a/src/mailman/rest/wsgiapp.py b/src/mailman/rest/wsgiapp.py index 83922ce9d..70d756405 100644 --- a/src/mailman/rest/wsgiapp.py +++ b/src/mailman/rest/wsgiapp.py @@ -216,11 +216,7 @@ class RootedAPI(API): @public def make_application(): - """Create the WSGI application. - - Use this if you want to integrate Mailman's REST server with your own WSGI - server. - """ + """Return a callable WSGI application object.""" return RootedAPI(Root()) |
