comparison src/http/modules/ngx_http_geo_module.c @ 448:76a79816b771 NGINX_0_7_36

nginx 0.7.36 *) Feature: a preliminary IPv6 support; the "listen" directive of the HTTP module supports IPv6. *) Bugfix: the $ancient_browser variable did not work for browsers preset by a "modern_browser" directives.
author Igor Sysoev <http://sysoev.ru>
date Sat, 21 Feb 2009 00:00:00 +0300
parents 6281966854a5
children a8424ffa495c
comparison
equal deleted inserted replaced
447:40964c811e59 448:76a79816b771
173 173
174 if (ctx->index == -1) { 174 if (ctx->index == -1) {
175 ngx_log_debug1(NGX_LOG_DEBUG_HTTP, r->connection->log, 0, 175 ngx_log_debug1(NGX_LOG_DEBUG_HTTP, r->connection->log, 0,
176 "http geo started: %V", &r->connection->addr_text); 176 "http geo started: %V", &r->connection->addr_text);
177 177
178 if (r->connection->sockaddr->sa_family != AF_INET) {
179 return 0;
180 }
181
178 sin = (struct sockaddr_in *) r->connection->sockaddr; 182 sin = (struct sockaddr_in *) r->connection->sockaddr;
179 return ntohl(sin->sin_addr.s_addr); 183 return ntohl(sin->sin_addr.s_addr);
180 } 184 }
181 185
182 v = ngx_http_get_flushed_variable(r, ctx->index); 186 v = ngx_http_get_flushed_variable(r, ctx->index);