diff src/http/ngx_http_core_module.c @ 3797:96f17c930a9e

revert processing NGX_OK and NGX_DONE in rewrite phase changed in r3634
author Igor Sysoev <igor@sysoev.ru>
date Mon, 29 Nov 2010 14:01:17 +0000
parents 279083731ec6
children 7f491d3f3b57
line wrap: on
line diff
--- a/src/http/ngx_http_core_module.c
+++ b/src/http/ngx_http_core_module.c
@@ -900,12 +900,21 @@ ngx_http_core_rewrite_phase(ngx_http_req
 
     rc = ph->handler(r);
 
+    if (rc == NGX_OK) {
+        r->phase_handler = ph->next;
+        return NGX_AGAIN;
+    }
+
     if (rc == NGX_DECLINED) {
         r->phase_handler++;
         return NGX_AGAIN;
     }
 
-    /* rc == NGX_OK || rc == NGX_ERROR || rc == NGX_HTTP_...  */
+    if (rc == NGX_DONE) {
+        return NGX_OK;
+    }
+
+    /* NGX_AGAIN || rc == NGX_ERROR || rc == NGX_HTTP_...  */
 
     ngx_http_finalize_request(r, rc);