Browse Source

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

Change-Id: I4750086962ee50a530694309ec8a6165eddabcf3
master
Stefan Bühler 1 year ago
parent
commit
8989ca32d4
2 changed files with 6 additions and 0 deletions
  1. +3
    -0
      src/modules/fastcgi_stream.c
  2. +3
    -0
      src/modules/mod_scgi.c

+ 3
- 0
src/modules/fastcgi_stream.c View File

@@ -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
- 0
src/modules/mod_scgi.c View File

@@ -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