]> git.kaiwu.me - nginx.git/commitdiff
Merge of r4947: xslt: prevented infinite loop.
authorMaxim Dounin <mdounin@mdounin.ru>
Sun, 10 Feb 2013 03:00:55 +0000 (03:00 +0000)
committerMaxim Dounin <mdounin@mdounin.ru>
Sun, 10 Feb 2013 03:00:55 +0000 (03:00 +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 9b0354b2ee69e66407bd8964f2891334c955aa68..ddcee6312b5c869148fd66ff715b7b2a5bc4e05f 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);
     }