summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorGraham.Dumpleton <devnull@localhost>2009-03-20 10:56:26 +0000
committerGraham.Dumpleton <devnull@localhost>2009-03-20 10:56:26 +0000
commit4626308efd58e48147246db44374e8bfe218e39c (patch)
tree8aba5f876562962160057910817623f9c0a2ea08
parenta9c5e84e6fc48601750798f1c55923e349cd8742 (diff)
downloadmod_wsgi-4626308efd58e48147246db44374e8bfe218e39c.tar.gz
Backport addition of mod_wsgi.version attribute to WSGI environment. See
issue #93.
-rw-r--r--mod_wsgi.c7
1 files changed, 7 insertions, 0 deletions
diff --git a/mod_wsgi.c b/mod_wsgi.c
index 7cfbf71..64bd523 100644
--- a/mod_wsgi.c
+++ b/mod_wsgi.c
@@ -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