summaryrefslogtreecommitdiffhomepage
path: root/src/nginext/nxt_go_port.c
diff options
context:
space:
mode:
authorMax Romanov <max.romanov@nginx.com>2017-08-30 11:50:29 -0700
committerMax Romanov <max.romanov@nginx.com>2017-08-30 11:50:29 -0700
commit9537821f3f486f5176affc7d4f51328c23efd48f (patch)
tree6001f9529a7ba65941bc98e6b4662725e79c23ff /src/nginext/nxt_go_port.c
parent9791b09ce35ca982cb04152847938124bb293cac (diff)
downloadunit-9537821f3f486f5176affc7d4f51328c23efd48f.tar.gz
unit-9537821f3f486f5176affc7d4f51328c23efd48f.tar.bz2
Send remote address to go application.
Diffstat (limited to 'src/nginext/nxt_go_port.c')
-rw-r--r--src/nginext/nxt_go_port.c5
1 files changed, 5 insertions, 0 deletions
diff --git a/src/nginext/nxt_go_port.c b/src/nginext/nxt_go_port.c
index fca3cf9a..033dd5be 100644
--- a/src/nginext/nxt_go_port.c
+++ b/src/nginext/nxt_go_port.c
@@ -69,6 +69,11 @@ nxt_go_data_handler(nxt_port_msg_t *port_msg, size_t size)
h->version.start[5] - '0',
h->version.start[7] - '0');
+ nxt_go_ctx_read_str(ctx, &ctx->r.remote);
+ if (ctx->r.remote.start != NULL) {
+ nxt_go_request_set_remote_addr(r, nxt_go_str(&ctx->r.remote));
+ }
+
nxt_go_ctx_read_str(ctx, &h->host);
nxt_go_ctx_read_str(ctx, &h->cookie);
nxt_go_ctx_read_str(ctx, &h->content_type);