comparison 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
comparison
equal deleted inserted replaced
3796:7dec2852e8fd 3797:96f17c930a9e
898 ngx_log_debug1(NGX_LOG_DEBUG_HTTP, r->connection->log, 0, 898 ngx_log_debug1(NGX_LOG_DEBUG_HTTP, r->connection->log, 0,
899 "rewrite phase: %ui", r->phase_handler); 899 "rewrite phase: %ui", r->phase_handler);
900 900
901 rc = ph->handler(r); 901 rc = ph->handler(r);
902 902
903 if (rc == NGX_OK) {
904 r->phase_handler = ph->next;
905 return NGX_AGAIN;
906 }
907
903 if (rc == NGX_DECLINED) { 908 if (rc == NGX_DECLINED) {
904 r->phase_handler++; 909 r->phase_handler++;
905 return NGX_AGAIN; 910 return NGX_AGAIN;
906 } 911 }
907 912
908 /* rc == NGX_OK || rc == NGX_ERROR || rc == NGX_HTTP_... */ 913 if (rc == NGX_DONE) {
914 return NGX_OK;
915 }
916
917 /* NGX_AGAIN || rc == NGX_ERROR || rc == NGX_HTTP_... */
909 918
910 ngx_http_finalize_request(r, rc); 919 ngx_http_finalize_request(r, rc);
911 920
912 return NGX_OK; 921 return NGX_OK;
913 } 922 }