diff options
author | Graham.Dumpleton <devnull@localhost> | 2009-03-20 10:56:26 +0000 |
---|---|---|
committer | Graham.Dumpleton <devnull@localhost> | 2009-03-20 10:56:26 +0000 |
commit | 4626308efd58e48147246db44374e8bfe218e39c (patch) | |
tree | 8aba5f876562962160057910817623f9c0a2ea08 | |
parent | a9c5e84e6fc48601750798f1c55923e349cd8742 (diff) | |
download | mod_wsgi-4626308efd58e48147246db44374e8bfe218e39c.tar.gz |
Backport addition of mod_wsgi.version attribute to WSGI environment. See
issue #93.
-rw-r--r-- | mod_wsgi.c | 7 |
1 files changed, 7 insertions, 0 deletions
@@ -2846,6 +2846,13 @@ static PyObject *Adapter_environ(AdapterObject *self) PyDict_SetItemString(vars, "wsgi.file_wrapper", object); Py_DECREF(object); + /* Add mod_wsgi version information. */ + + object = Py_BuildValue("(ii)", MOD_WSGI_MAJORVERSION_NUMBER, + MOD_WSGI_MINORVERSION_NUMBER); + PyDict_SetItemString(vars, "mod_wsgi.version", object); + Py_DECREF(object); + /* * If Apache extensions are enabled and running in embedded * mode add a CObject reference to the Apache request_rec |