diff options
author | Igor Sysoev <igor@sysoev.ru> | 2004-04-26 13:40:01 +0000 |
---|---|---|
committer | Igor Sysoev <igor@sysoev.ru> | 2004-04-26 13:40:01 +0000 |
commit | a30a028f14b18d7c12892d2fe79f457b4a67dd29 (patch) | |
tree | d16ca86680b775b0c8acc60f09e2a4db03744781 /src | |
parent | 3f4685f3ded30199ec0c61f98b016f5880330422 (diff) | |
download | nginx-a30a028f14b18d7c12892d2fe79f457b4a67dd29.tar.gz nginx-a30a028f14b18d7c12892d2fe79f457b4a67dd29.zip |
nginx-0.0.3-2004-04-26-17:40:01 import
Diffstat (limited to 'src')
-rw-r--r-- | src/event/modules/ngx_poll_module.c | 2 | ||||
-rw-r--r-- | src/http/modules/ngx_http_gzip_filter.c | 28 | ||||
-rw-r--r-- | src/http/ngx_http_output_filter.c | 4 | ||||
-rw-r--r-- | src/os/unix/ngx_process_cycle.c | 2 |
4 files changed, 18 insertions, 18 deletions
diff --git a/src/event/modules/ngx_poll_module.c b/src/event/modules/ngx_poll_module.c index 3a2ca4c2a..b40499d9d 100644 --- a/src/event/modules/ngx_poll_module.c +++ b/src/event/modules/ngx_poll_module.c @@ -404,7 +404,7 @@ int ngx_poll_process_events(ngx_cycle_t *cycle) } #endif - if (event_list[i].revents & (POLLERR|POLLNVAL)) { + if (event_list[i].revents & POLLNVAL) { ngx_log_error(NGX_LOG_ALERT, cycle->log, 0, "poll() error fd:%d ev:%04X rev:%04X", event_list[i].fd, diff --git a/src/http/modules/ngx_http_gzip_filter.c b/src/http/modules/ngx_http_gzip_filter.c index f5cdb493e..b7b5abf96 100644 --- a/src/http/modules/ngx_http_gzip_filter.c +++ b/src/http/modules/ngx_http_gzip_filter.c @@ -591,15 +591,15 @@ static int ngx_http_gzip_body_filter(ngx_http_request_t *r, ngx_chain_t *in) ctx->in_hunk, ctx->in_hunk->pos); -#if 0 - if (!ctx->redo) { + if (ctx->zstream.next_in) { ctx->in_hunk->pos = ctx->zstream.next_in; - ctx->out_hunk->last = ctx->zstream.next_out; + + if (ctx->zstream.avail_in == 0) { + ctx->zstream.next_in = NULL; + } } -#else - ctx->in_hunk->pos = ctx->zstream.next_in; + ctx->out_hunk->last = ctx->zstream.next_out; -#endif if (ctx->zstream.avail_out == 0) { ngx_alloc_link_and_set_hunk(cl, ctx->out_hunk, r->pool, @@ -626,9 +626,7 @@ static int ngx_http_gzip_body_filter(ngx_http_request_t *r, ngx_chain_t *in) break; } - if (ctx->flush == Z_FINISH) { - - /* rc == Z_STREAM_END */ + if (rc == Z_STREAM_END) { ctx->zin = ctx->zstream.total_in; ctx->zout = 10 + ctx->zstream.total_out + 8; @@ -642,8 +640,6 @@ static int ngx_http_gzip_body_filter(ngx_http_request_t *r, ngx_chain_t *in) ngx_pfree(r->pool, ctx->preallocated); - ctx->flush = Z_NO_FLUSH; - ngx_alloc_link_and_set_hunk(cl, ctx->out_hunk, r->pool, ngx_http_gzip_error(ctx)); *ctx->last_out = cl; @@ -716,12 +712,6 @@ static int ngx_http_gzip_body_filter(ngx_http_request_t *r, ngx_chain_t *in) return last; } -#if 0 - if (ctx->out == NULL && last != NGX_NONE) { - return last; - } -#endif - last = ngx_http_next_body_filter(r, ctx->out); if (last == NGX_ERROR) { @@ -731,6 +721,10 @@ static int ngx_http_gzip_body_filter(ngx_http_request_t *r, ngx_chain_t *in) ngx_chain_update_chains(&ctx->free, &ctx->busy, &ctx->out, (ngx_hunk_tag_t) &ngx_http_gzip_filter_module); ctx->last_out = &ctx->out; + + if (ctx->done) { + return last; + } } } diff --git a/src/http/ngx_http_output_filter.c b/src/http/ngx_http_output_filter.c index 7c8986fb5..ce226a971 100644 --- a/src/http/ngx_http_output_filter.c +++ b/src/http/ngx_http_output_filter.c @@ -58,6 +58,10 @@ ngx_int_t ngx_http_output_filter(ngx_http_request_t *r, ngx_chain_t *in) ngx_output_chain_ctx_t *ctx; ngx_http_output_filter_conf_t *conf; + if (r->connection->write->error) { + return NGX_ERROR; + } + ctx = ngx_http_get_module_ctx(r->main ? r->main : r, ngx_http_output_filter_module); diff --git a/src/os/unix/ngx_process_cycle.c b/src/os/unix/ngx_process_cycle.c index 5f7830352..4a281f043 100644 --- a/src/os/unix/ngx_process_cycle.c +++ b/src/os/unix/ngx_process_cycle.c @@ -273,7 +273,9 @@ void ngx_single_process_cycle(ngx_cycle_t *cycle, ngx_master_ctx_t *ctx) { ngx_uint_t i; +#if 0 ngx_setproctitle("single worker process"); +#endif ngx_init_temp_number(); |