summaryrefslogtreecommitdiffhomepage
path: root/src/nxt_php_sapi.c
diff options
context:
space:
mode:
authorMax Romanov <max.romanov@nginx.com>2019-03-21 13:55:57 +0300
committerMax Romanov <max.romanov@nginx.com>2019-03-21 13:55:57 +0300
commit452ce0789e8e8f1ac98cc0ed7efce03656a3d616 (patch)
tree395a7f6964448568ec8521e6cd1338763a9d743f /src/nxt_php_sapi.c
parent39e147a858e7d135aa224a308b4d41061e00c296 (diff)
downloadunit-452ce0789e8e8f1ac98cc0ed7efce03656a3d616.tar.gz
unit-452ce0789e8e8f1ac98cc0ed7efce03656a3d616.tar.bz2
Adjusting request schema value according to connection tls state.
This closes #223 issue on GitHub.
Diffstat (limited to 'src/nxt_php_sapi.c')
-rw-r--r--src/nxt_php_sapi.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/src/nxt_php_sapi.c b/src/nxt_php_sapi.c
index 4b71de5c..a6ec6c60 100644
--- a/src/nxt_php_sapi.c
+++ b/src/nxt_php_sapi.c
@@ -929,6 +929,10 @@ nxt_php_register_variables(zval *track_vars_array TSRMLS_DC)
track_vars_array TSRMLS_CC);
nxt_php_set_cstr(req, "SERVER_PORT", "80", 2, track_vars_array TSRMLS_CC);
+ if (r->tls) {
+ nxt_php_set_cstr(req, "HTTPS", "on", 2, track_vars_array TSRMLS_CC);
+ }
+
f_end = r->fields + r->fields_count;
for (f = r->fields; f < f_end; f++) {
name = nxt_unit_sptr_get(&f->name);