From 16cd55637d4f3ff3cd6787723950d64d7f1a0dd1 Mon Sep 17 00:00:00 2001 From: Unbit Date: Fri, 14 Mar 2014 11:48:36 +0100 Subject: [PATCH] added support for mongrel2 URL_SCHEME #562 --- plugins/mongrel2/mongrel2.c | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/plugins/mongrel2/mongrel2.c b/plugins/mongrel2/mongrel2.c index c41a3c9d..ee1eeacc 100644 --- a/plugins/mongrel2/mongrel2.c +++ b/plugins/mongrel2/mongrel2.c @@ -102,6 +102,10 @@ static int uwsgi_mongrel2_json_parse(json_t * root, struct wsgi_request *wsgi_re } } + if ((json_val = uwsgi_mongrel2_json_get_string(root, "URL_SCHEME"))) { + wsgi_req->uh->pktsize += proto_base_add_uwsgi_var(wsgi_req, "UWSGI_SCHEME", 12, json_val, strlen(json_val)); + } + if ((json_val = uwsgi_mongrel2_json_get_string(root, "host"))) { char *colon = strchr(json_val, ':'); if (colon) {