Browse Source

[mod_{fast,s}cgi] support REQUEST_SCHEME cgi variable

Change-Id: I4750086962ee50a530694309ec8a6165eddabcf3
personal/stbuehler/wip
Stefan Bühler 2 years ago
parent
commit
8989ca32d4
  1. 3
      src/modules/fastcgi_stream.c
  2. 3
      src/modules/mod_scgi.c

3
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"));
}
}

3
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"));
}
}

Loading…
Cancel
Save