diff options
author | Igor Sysoev <igor@sysoev.ru> | 2009-05-01 22:41:07 +0400 |
---|---|---|
committer | Igor Sysoev <igor@sysoev.ru> | 2009-05-01 22:41:07 +0400 |
commit | 71d1f492688aba3d7943d199d9d152e4dbb1ab36 (patch) | |
tree | 66b1647505cf19df2a88a644a3978b32cf6ad5ed /src/http/modules | |
parent | b01c9cc10ee7c39fb0cd175871adbb00be8f6706 (diff) |
ngx_http_filter_finalize_request() and ngx_http_clean_header()
Diffstat (limited to 'src/http/modules')
-rw-r--r-- | src/http/modules/ngx_http_xslt_filter_module.c | 22 |
1 files changed, 3 insertions, 19 deletions
diff --git a/src/http/modules/ngx_http_xslt_filter_module.c b/src/http/modules/ngx_http_xslt_filter_module.c index 0762ee529..4759308c2 100644 --- a/src/http/modules/ngx_http_xslt_filter_module.c +++ b/src/http/modules/ngx_http_xslt_filter_module.c @@ -64,7 +64,6 @@ typedef struct { static ngx_int_t ngx_http_xslt_send(ngx_http_request_t *r, ngx_http_xslt_filter_ctx_t *ctx, ngx_buf_t *b); -static ngx_int_t ngx_http_xslt_filter_internal_error(ngx_http_request_t *r); static ngx_int_t ngx_http_xslt_add_chunk(ngx_http_request_t *r, ngx_http_xslt_filter_ctx_t *ctx, ngx_buf_t *b); @@ -320,14 +319,15 @@ 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_xslt_filter_internal_error(r); + return ngx_http_filter_finalize_request(r, + NGX_HTTP_INTERNAL_SERVER_ERROR); } cln = ngx_pool_cleanup_add(r->pool, 0); if (cln == NULL) { ngx_free(b->pos); - return ngx_http_special_response_handler(r, + return ngx_http_filter_finalize_request(r, NGX_HTTP_INTERNAL_SERVER_ERROR); } @@ -360,22 +360,6 @@ ngx_http_xslt_send(ngx_http_request_t *r, ngx_http_xslt_filter_ctx_t *ctx, static ngx_int_t -ngx_http_xslt_filter_internal_error(ngx_http_request_t *r) -{ - ngx_int_t rc; - - /* clear the modules contexts */ - ngx_memzero(r->ctx, sizeof(void *) * ngx_http_max_module); - - rc = ngx_http_special_response_handler(r, NGX_HTTP_INTERNAL_SERVER_ERROR); - - /* NGX_ERROR resets any pending data */ - - return (rc == NGX_OK) ? NGX_ERROR : rc; -} - - -static ngx_int_t ngx_http_xslt_add_chunk(ngx_http_request_t *r, ngx_http_xslt_filter_ctx_t *ctx, ngx_buf_t *b) { |