diff options
| author | Igor Sysoev <igor@sysoev.ru> | 2003-02-26 20:21:43 +0000 |
|---|---|---|
| committer | Igor Sysoev <igor@sysoev.ru> | 2003-02-26 20:21:43 +0000 |
| commit | ff148df8f694212e2cf13f0d43532949433831a2 (patch) | |
| tree | 1323b3de05544f57639c20080db3ac386bc0050d /src/http | |
| parent | 9a5f495afdf8cc1d33ae1741e1409c0bdcc3589d (diff) | |
| download | nginx-ff148df8f694212e2cf13f0d43532949433831a2.tar.gz nginx-ff148df8f694212e2cf13f0d43532949433831a2.tar.bz2 | |
nginx-0.0.1-2003-02-26-23:21:43 import
Diffstat (limited to 'src/http')
| -rw-r--r-- | src/http/modules/ngx_http_static_handler.c | 2 | ||||
| -rw-r--r-- | src/http/ngx_http_header_filter.c | 3 | ||||
| -rw-r--r-- | src/http/ngx_http_write_filter.c | 9 |
3 files changed, 8 insertions, 6 deletions
diff --git a/src/http/modules/ngx_http_static_handler.c b/src/http/modules/ngx_http_static_handler.c index a7ba91231..8360cc367 100644 --- a/src/http/modules/ngx_http_static_handler.c +++ b/src/http/modules/ngx_http_static_handler.c @@ -141,7 +141,7 @@ int ngx_http_static_handler(ngx_http_request_t *r) if (r->header_only) return rc; -#if 0 +#if 1 h->type = NGX_HUNK_FILE|NGX_HUNK_LAST; h->pos.file = 0; diff --git a/src/http/ngx_http_header_filter.c b/src/http/ngx_http_header_filter.c index 282b82a78..6af5cc0db 100644 --- a/src/http/ngx_http_header_filter.c +++ b/src/http/ngx_http_header_filter.c @@ -95,7 +95,8 @@ static int ngx_http_header_filter(ngx_http_request_t *r) ngx_log_debug(r->connection->log, "%d %d" _ ims _ r->headers_out.last_modified_time); - if (ims != NGX_ERROR && ims >= r->headers_out.last_modified_time) { + /* I think that the date equality is correcter */ + if (ims != NGX_ERROR && ims == r->headers_out.last_modified_time) { r->headers_out.status = NGX_HTTP_NOT_MODIFIED; r->headers_out.content_length = -1; r->headers_out.content_type->key.len = 0; diff --git a/src/http/ngx_http_write_filter.c b/src/http/ngx_http_write_filter.c index 270b47f29..e72ea7e17 100644 --- a/src/http/ngx_http_write_filter.c +++ b/src/http/ngx_http_write_filter.c @@ -4,6 +4,7 @@ #include <ngx_core.h> #include <ngx_hunk.h> #include <ngx_conf_file.h> +#include <ngx_connection.h> #include <ngx_event_write.h> @@ -81,7 +82,7 @@ int ngx_http_write_filter(ngx_http_request_t *r, ngx_chain_t *in) le = &ce->next; size += ce->hunk->last.file - ce->hunk->pos.file; -#if (NGX_DEBUG_WRITE_FILTER0) +#if (NGX_DEBUG_WRITE_FILTER) ngx_log_debug(r->connection->log, "write filter: old chunk: %x " QX_FMT " " QD_FMT _ ce->hunk->type _ ce->hunk->pos.file _ @@ -107,7 +108,7 @@ int ngx_http_write_filter(ngx_http_request_t *r, ngx_chain_t *in) le = &ce->next; size += ce->hunk->last.file - ce->hunk->pos.file; -#if (NGX_DEBUG_WRITE_FILTER0) +#if (NGX_DEBUG_WRITE_FILTER) ngx_log_debug(r->connection->log, "write filter: new hunk: %x " QX_FMT " " QD_FMT _ ce->hunk->type _ ce->hunk->pos.file _ @@ -127,7 +128,7 @@ int ngx_http_write_filter(ngx_http_request_t *r, ngx_chain_t *in) ngx_http_get_module_loc_conf(r->main ? r->main : r, ngx_http_write_filter_module); -#if (NGX_DEBUG_WRITE_FILTER0) +#if (NGX_DEBUG_WRITE_FILTER) ngx_log_debug(r->connection->log, "write filter: last:%d flush:%d" _ last _ flush); #endif @@ -138,7 +139,7 @@ int ngx_http_write_filter(ngx_http_request_t *r, ngx_chain_t *in) return NGX_OK; } - chain = ngx_event_write(r->connection, ctx->out, flush); + chain = ngx_write_chain(r->connection, ctx->out, flush); #if (NGX_DEBUG_WRITE_FILTER) ngx_log_debug(r->connection->log, "write filter %x" _ chain); |
