]> git.kaiwu.me - nginx.git/commitdiff
Xslt: prevented infinite loop.
authorRuslan Ermilov <ru@nginx.com>
Thu, 6 Dec 2012 21:22:58 +0000 (21:22 +0000)
committerRuslan Ermilov <ru@nginx.com>
Thu, 6 Dec 2012 21:22:58 +0000 (21:22 +0000)
If XSLT transformation failed and error 500 was handled in the same
location, an infinite loop occured that exhausted the stack.

src/http/modules/ngx_http_xslt_filter_module.c

index 94d1c86ccd57d92a176caafc1086bfed4e71367d..a6ae1ce02b8ba21921c1098265abf4eba961f3b9 100644 (file)
@@ -307,7 +307,7 @@ ngx_http_xslt_send(ngx_http_request_t *r, ngx_http_xslt_filter_ctx_t *ctx,
     ctx->done = 1;
 
     if (b == NULL) {
-        return ngx_http_filter_finalize_request(r, NULL,
+        return ngx_http_filter_finalize_request(r, &ngx_http_xslt_filter_module,
                                                NGX_HTTP_INTERNAL_SERVER_ERROR);
     }
 
@@ -315,7 +315,7 @@ ngx_http_xslt_send(ngx_http_request_t *r, ngx_http_xslt_filter_ctx_t *ctx,
 
     if (cln == NULL) {
         ngx_free(b->pos);
-        return ngx_http_filter_finalize_request(r, NULL,
+        return ngx_http_filter_finalize_request(r, &ngx_http_xslt_filter_module,
                                                NGX_HTTP_INTERNAL_SERVER_ERROR);
     }