From a09d25ccaab6475fba3f98467b0069b8bf5c6594 Mon Sep 17 00:00:00 2001 From: getcwd Date: Mon, 14 Apr 2014 14:22:31 -0700 Subject: [PATCH] add ${HTTPS} to https_socket https plugin sets ${HTTPS} so should https_socket proto -- admins can write consistent HTTP/HTTPS routing rules for both. --- proto/http.c | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/proto/http.c b/proto/http.c index ca63b1b2..5562cad5 100644 --- a/proto/http.c +++ b/proto/http.c @@ -304,6 +304,10 @@ static int http_parse(struct wsgi_request *wsgi_req, char *watermark) { } } + if (wsgi_req->https_len > 0) { + wsgi_req->uh->pktsize += proto_base_add_uwsgi_var(wsgi_req, "HTTPS", 5, wsgi_req->https, wsgi_req->https_len); + } + //HEADERS base = ptr;