diff src/http/modules/ngx_http_realip_module.c @ 272:29a6403156b0 NGINX_0_5_6

nginx 0.5.6 *) Change: now the ngx_http_index_module ignores all methods except the GET, HEAD, and POST methods. *) Feature: the ngx_http_limit_zone_module. *) Feature: the $binary_remote_addr variable. *) Feature: the "ssl_session_cache" directives of the ngx_http_ssl_module and ngx_imap_ssl_module. *) Feature: the DELETE method supports recursive removal. *) Bugfix: the byte-ranges were transferred incorrectly if the $r->sendfile() was used.
author Igor Sysoev <http://sysoev.ru>
date Tue, 09 Jan 2007 00:00:00 +0300
parents 38e7b94d63ac
children 5bef04fc3fd5
line wrap: on
line diff
--- a/src/http/modules/ngx_http_realip_module.c
+++ b/src/http/modules/ngx_http_realip_module.c
@@ -103,18 +103,18 @@ ngx_http_realip_handler(ngx_http_request
     ngx_http_realip_loc_conf_t  *rlcf;
 
     if (r->realip_set) {
-        return NGX_OK;
+        return NGX_DECLINED;
     }
 
     rlcf = ngx_http_get_module_loc_conf(r, ngx_http_realip_module);
 
     if (rlcf->from == NULL) {
-        return NGX_OK;
+        return NGX_DECLINED;
     }
 
     if (rlcf->xfwd == 0) {
         if (r->headers_in.x_real_ip == NULL) {
-            return NGX_OK;
+            return NGX_DECLINED;
         }
 
         len = r->headers_in.x_real_ip->value.len;
@@ -122,7 +122,7 @@ ngx_http_realip_handler(ngx_http_request
 
     } else {
         if (r->headers_in.x_forwarded_for == NULL) {
-            return NGX_OK;
+            return NGX_DECLINED;
         }
 
         len = r->headers_in.x_forwarded_for->value.len;
@@ -158,11 +158,11 @@ ngx_http_realip_handler(ngx_http_request
 
             r->realip_set = 1;
 
-            return NGX_OK;
+            return NGX_DECLINED;
         }
     }
 
-    return NGX_OK;
+    return NGX_DECLINED;
 }