From d161962db1a4990d13fe151baac53a3de68af23b Mon Sep 17 00:00:00 2001 From: "roberto@mrspurr" Date: Sun, 28 Nov 2010 09:54:31 +0100 Subject: [PATCH] pass custom apache variables via SetEnv --- apache2/mod_uwsgi.c | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/apache2/mod_uwsgi.c b/apache2/mod_uwsgi.c index f6b9f1b1..150ee278 100644 --- a/apache2/mod_uwsgi.c +++ b/apache2/mod_uwsgi.c @@ -392,6 +392,13 @@ static int uwsgi_handler(request_rec *r) { } } } + + /* environment variables */ + headers = apr_table_elts(r->subprocess_env); + h = (apr_table_entry_t*) headers->elts; + for (i = 0; i < headers->nelts; ++i) { + vecptr = uwsgi_add_var(uwsgi_vars, vecptr, h[i].key, h[i].val, &pkt_size) ; + } uwsgi_vars[0].iov_base = pkt_header;