diff options
author | Igor Sysoev <igor@sysoev.ru> | 2017-09-01 07:54:01 +0300 |
---|---|---|
committer | Igor Sysoev <igor@sysoev.ru> | 2017-09-01 07:54:01 +0300 |
commit | ff515f43124ed0b05a2a352d7ec1ed0b22253c92 (patch) | |
tree | aa73e59450592f6d57f2e2178a2ee35134e7099a /src/nxt_router.c | |
parent | 9941b0cd6557902613a41d3b85c03e4efca6eb8c (diff) | |
download | unit-ff515f43124ed0b05a2a352d7ec1ed0b22253c92.tar.gz unit-ff515f43124ed0b05a2a352d7ec1ed0b22253c92.tar.bz2 |
Added SERVER_ADDR parameter for Python and PHP modules.
Diffstat (limited to 'src/nxt_router.c')
-rw-r--r-- | src/nxt_router.c | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/src/nxt_router.c b/src/nxt_router.c index 6cadb816..3faca2c2 100644 --- a/src/nxt_router.c +++ b/src/nxt_router.c @@ -2431,6 +2431,7 @@ nxt_router_conn_http_header_parse(nxt_task_t *task, void *obj, void *data) nxt_int_t ret; nxt_buf_t *buf; nxt_conn_t *c; + nxt_sockaddr_t *local; nxt_app_parse_ctx_t *ap; nxt_app_request_body_t *b; nxt_socket_conf_joint_t *joint; @@ -2461,6 +2462,10 @@ nxt_router_conn_http_header_parse(nxt_task_t *task, void *obj, void *data) ap->r.remote.start = nxt_sockaddr_address(c->remote); ap->r.remote.length = c->remote->address_length; + local = joint->socket_conf->sockaddr; + ap->r.local.start = nxt_sockaddr_address(local); + ap->r.local.length = local->address_length; + ap->r.header.buf = buf; } @@ -2781,6 +2786,7 @@ nxt_python_prepare_msg(nxt_task_t *task, nxt_app_request_t *r, NXT_WRITE(&h->version); NXT_WRITE(&r->remote); + NXT_WRITE(&r->local); NXT_WRITE(&h->host); NXT_WRITE(&h->content_type); @@ -2864,6 +2870,7 @@ nxt_php_prepare_msg(nxt_task_t *task, nxt_app_request_t *r, // DOCUMENT_ROOT NXT_WRITE(&r->remote); + NXT_WRITE(&r->local); NXT_WRITE(&h->host); NXT_WRITE(&h->cookie); |