summaryrefslogtreecommitdiffhomepage
path: root/src/go/unit/nxt_cgo_lib.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/go/unit/nxt_cgo_lib.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/go/unit/nxt_cgo_lib.c')
-rw-r--r--src/go/unit/nxt_cgo_lib.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/src/go/unit/nxt_cgo_lib.c b/src/go/unit/nxt_cgo_lib.c
index 98a23482..cc1228f5 100644
--- a/src/go/unit/nxt_cgo_lib.c
+++ b/src/go/unit/nxt_cgo_lib.c
@@ -83,6 +83,10 @@ nxt_cgo_request_handler(nxt_unit_request_info_t *req)
nxt_go_request_set_remote_addr(go_req,
nxt_cgo_str_init(&remote_addr, &r->remote, r->remote_length));
+ if (r->tls) {
+ nxt_go_request_set_tls(go_req);
+ }
+
nxt_go_request_handler(go_req, (uintptr_t) req->unit->data);
}