Mercurial > hg > nginx-quic
diff src/http/ngx_http_output_filter.c @ 57:a499e0d1f16e
nginx-0.0.1-2003-01-30-10:28:09 import
author | Igor Sysoev <igor@sysoev.ru> |
---|---|
date | Thu, 30 Jan 2003 07:28:09 +0000 |
parents | 27b628ef907e |
children | e8cdc2989cee |
line wrap: on
line diff
--- a/src/http/ngx_http_output_filter.c +++ b/src/http/ngx_http_output_filter.c @@ -59,12 +59,11 @@ ngx_module_t ngx_http_output_filter_mod int ngx_http_output_filter(ngx_http_request_t *r, ngx_hunk_t *hunk) { - int rc, once; - size_t size; - ssize_t n; - ngx_chain_t *ce; - ngx_http_output_filter_ctx_t *ctx; - ngx_http_output_filter_conf_t *conf; + int rc, once; + size_t size; + ngx_chain_t *ce; + ngx_http_output_filter_ctx_t *ctx; + ngx_http_output_filter_conf_t *conf; ctx = (ngx_http_output_filter_ctx_t *) ngx_http_get_module_ctx(r->main ? r->main : r, @@ -79,6 +78,10 @@ int ngx_http_output_filter(ngx_http_requ ctx->last = 1; } +#if (NGX_SUPPRESS_WARN) + rc = NGX_ALERT; +#endif + for (once = 1; once || ctx->in; once = 0) { /* input chain is not empty */ @@ -179,13 +182,12 @@ int ngx_http_output_filter(ngx_http_requ } else { if (ctx->hunk == NULL) { - if (hunk->type & NGX_HUNK_LAST) { - - conf = (ngx_http_output_filter_conf_t *) + conf = (ngx_http_output_filter_conf_t *) ngx_http_get_module_loc_conf( r->main ? r->main : r, ngx_http_output_filter_module); + if (hunk->type & NGX_HUNK_LAST) { size = hunk->last.mem - hunk->pos.mem; if (size > conf->hunk_size) { size = conf->hunk_size; @@ -243,6 +245,14 @@ int ngx_http_output_filter(ngx_http_requ ctx->hunk->pos.mem = ctx->hunk->last.mem = ctx->hunk->start; } +#if (NGX_SUPPRESS_WARN) + if (rc == NGX_ALERT) { + ngx_log_error(NGX_LOG_ALERT, r->connection->log, 0, + "ngx_http_output_filter: rc == NGX_ALERT"); + return NGX_ERROR; + } +#endif + if (rc == NGX_OK && ctx->last) { return NGX_OK; }