]> git.kaiwu.me - nginx.git/commitdiff
fix request counter handling in perl module for $r->internal_redirect()
authorIgor Sysoev <igor@sysoev.ru>
Tue, 8 Sep 2009 11:33:32 +0000 (11:33 +0000)
committerIgor Sysoev <igor@sysoev.ru>
Tue, 8 Sep 2009 11:33:32 +0000 (11:33 +0000)
and $r->has_request_body(), the bug was introduced in r3050

src/http/modules/perl/ngx_http_perl_module.c

index 34ecc9a33ab6d169f6bec86e3747254fd8871f50..634801eced0c06603170a604a462ef992c111cb1 100644 (file)
@@ -238,6 +238,7 @@ ngx_http_perl_handle_request(ngx_http_request_t *r)
                    "perl handler done: %i", rc);
 
     if (rc == NGX_DONE) {
+        ngx_http_finalize_request(r, rc);
         return;
     }
 
@@ -257,11 +258,13 @@ ngx_http_perl_handle_request(ngx_http_request_t *r)
     ctx->redirect_uri.len = 0;
 
     if (ctx->done || ctx->next) {
+        ngx_http_finalize_request(r, NGX_DONE);
         return;
     }
 
     if (uri.len) {
         ngx_http_internal_redirect(r, &uri, &args);
+        ngx_http_finalize_request(r, NGX_DONE);
         return;
     }