aboutsummaryrefslogtreecommitdiff
path: root/src/http/ngx_http_variables.c
diff options
context:
space:
mode:
authorRuslan Ermilov <ru@nginx.com>2013-02-27 13:29:50 +0000
committerRuslan Ermilov <ru@nginx.com>2013-02-27 13:29:50 +0000
commit67a68720b7f08542c891d7b9ef08f07e3543b0e4 (patch)
treeb61423ee7b49a7280f87d66606c96785681d71ad /src/http/ngx_http_variables.c
parent40ea120b34342a3aa80f27378c7f05360b2da7a0 (diff)
downloadnginx-67a68720b7f08542c891d7b9ef08f07e3543b0e4.tar.gz
nginx-67a68720b7f08542c891d7b9ef08f07e3543b0e4.zip
Correctly handle multiple X-Forwarded-For headers (ticket #106).
Diffstat (limited to 'src/http/ngx_http_variables.c')
-rw-r--r--src/http/ngx_http_variables.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/src/http/ngx_http_variables.c b/src/http/ngx_http_variables.c
index 6fbb2de41..6f1e0344d 100644
--- a/src/http/ngx_http_variables.c
+++ b/src/http/ngx_http_variables.c
@@ -138,8 +138,8 @@ static ngx_int_t ngx_http_variable_time_local(ngx_http_request_t *r,
*/
/*
- * the $http_host, $http_user_agent, $http_referer, $http_via,
- * and $http_x_forwarded_for variables may be handled by generic
+ * the $http_host, $http_user_agent, $http_referer, and $http_via
+ * variables may be handled by generic
* ngx_http_variable_unknown_header_in(), but for performance reasons
* they are handled using dedicated entries
*/
@@ -161,7 +161,7 @@ static ngx_http_variable_t ngx_http_core_variables[] = {
#endif
#if (NGX_HTTP_X_FORWARDED_FOR)
- { ngx_string("http_x_forwarded_for"), NULL, ngx_http_variable_header,
+ { ngx_string("http_x_forwarded_for"), NULL, ngx_http_variable_headers,
offsetof(ngx_http_request_t, headers_in.x_forwarded_for), 0, 0 },
#endif