summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorStefan Bühler <stbuehler@web.de>2019-08-31 13:08:11 +0200
committerStefan Bühler <stbuehler@web.de>2019-08-31 13:08:11 +0200
commit8989ca32d4a5654af23c41cbd129c0e97dffe474 (patch)
treee136b17fe70ea5f7c1f9526b5e30d4cffc91b9ac
parentafaf285bfbfe248281a6c2aa07e12c9dea1b1f22 (diff)
downloadlighttpd2-8989ca32d4a5654af23c41cbd129c0e97dffe474.tar.gz
lighttpd2-8989ca32d4a5654af23c41cbd129c0e97dffe474.zip
[mod_{fast,s}cgi] support REQUEST_SCHEME cgi variable
Change-Id: I4750086962ee50a530694309ec8a6165eddabcf3
-rw-r--r--src/modules/fastcgi_stream.c3
-rw-r--r--src/modules/mod_scgi.c3
2 files changed, 6 insertions, 0 deletions
diff --git a/src/modules/fastcgi_stream.c b/src/modules/fastcgi_stream.c
index 1e34f71..d22eefb 100644
--- a/src/modules/fastcgi_stream.c
+++ b/src/modules/fastcgi_stream.c
@@ -487,6 +487,9 @@ static void fastcgi_env_create(liVRequest *vr, liEnvironmentDup *envdup, GByteAr
if (coninfo->is_ssl) {
fastcgi_env_add(buf, envdup, CONST_STR_LEN("HTTPS"), CONST_STR_LEN("on"));
+ fastcgi_env_add(buf, envdup, CONST_STR_LEN("REQUEST_SCHEME"), CONST_STR_LEN("https"));
+ } else {
+ fastcgi_env_add(buf, envdup, CONST_STR_LEN("REQUEST_SCHEME"), CONST_STR_LEN("http"));
}
}
diff --git a/src/modules/mod_scgi.c b/src/modules/mod_scgi.c
index 679a394..5e92916 100644
--- a/src/modules/mod_scgi.c
+++ b/src/modules/mod_scgi.c
@@ -134,6 +134,9 @@ static void scgi_env_create(liVRequest *vr, liEnvironmentDup *envdup, GByteArray
if (coninfo->is_ssl) {
scgi_env_add(buf, envdup, CONST_STR_LEN("HTTPS"), CONST_STR_LEN("on"));
+ scgi_env_add(buf, envdup, CONST_STR_LEN("REQUEST_SCHEME"), CONST_STR_LEN("https"));
+ } else {
+ scgi_env_add(buf, envdup, CONST_STR_LEN("REQUEST_SCHEME"), CONST_STR_LEN("http"));
}
}