diff options
Diffstat (limited to 'src/http')
| -rw-r--r-- | src/http/modules/ngx_http_gzip_filter.c | 2 | ||||
| -rw-r--r-- | src/http/modules/ngx_http_headers_filter.c | 12 | ||||
| -rw-r--r-- | src/http/modules/proxy/ngx_http_proxy_handler.c | 6 | ||||
| -rw-r--r-- | src/http/ngx_http_request.c | 4 |
4 files changed, 11 insertions, 13 deletions
diff --git a/src/http/modules/ngx_http_gzip_filter.c b/src/http/modules/ngx_http_gzip_filter.c index 5f3825ebd..5c6d0d12d 100644 --- a/src/http/modules/ngx_http_gzip_filter.c +++ b/src/http/modules/ngx_http_gzip_filter.c @@ -351,7 +351,7 @@ static ngx_int_t ngx_http_gzip_proxied(ngx_http_request_t *r, } } else { - date = ngx_cached_time; + date = ngx_time(); } if (expires < date) { diff --git a/src/http/modules/ngx_http_headers_filter.c b/src/http/modules/ngx_http_headers_filter.c index 7f74b4793..b850ee36d 100644 --- a/src/http/modules/ngx_http_headers_filter.c +++ b/src/http/modules/ngx_http_headers_filter.c @@ -118,24 +118,22 @@ static ngx_int_t ngx_http_headers_filter(ngx_http_request_t *r) cc->value.data = (u_char *) "max-age=0"; } else { - ngx_http_time(expires->value.data, - ngx_cached_time + conf->expires); + ngx_http_time(expires->value.data, ngx_time() + conf->expires); if (conf->expires < 0) { cc->value.len = sizeof("no-cache") - 1; cc->value.data = (u_char *) "no-cache"; } else { - cc->value.data = ngx_palloc(r->pool, NGX_TIME_T_LEN + 1); + cc->value.data = ngx_palloc(r->pool, TIME_T_LEN + 1); if (cc->value.data == NULL) { return NGX_ERROR; } cc->value.len = ngx_snprintf((char *) cc->value.data, - sizeof("max-age=") - + NGX_TIME_T_LEN, - "max-age=" TIME_T_FMT, - conf->expires); + sizeof("max-age=") + TIME_T_LEN, + "max-age=" TIME_T_FMT, + conf->expires); } } } diff --git a/src/http/modules/proxy/ngx_http_proxy_handler.c b/src/http/modules/proxy/ngx_http_proxy_handler.c index 99ac1aa82..b7177a339 100644 --- a/src/http/modules/proxy/ngx_http_proxy_handler.c +++ b/src/http/modules/proxy/ngx_http_proxy_handler.c @@ -708,7 +708,7 @@ static u_char *ngx_http_proxy_log_proxy_state(ngx_http_request_t *r, *buf++ = '-'; } else { - buf += ngx_snprintf((char *) buf, NGX_TIME_T_LEN, + buf += ngx_snprintf((char *) buf, TIME_T_LEN, TIME_T_FMT, p->state->expired); } @@ -718,7 +718,7 @@ static u_char *ngx_http_proxy_log_proxy_state(ngx_http_request_t *r, *buf++ = '-'; } else { - buf += ngx_snprintf((char *) buf, NGX_TIME_T_LEN, + buf += ngx_snprintf((char *) buf, TIME_T_LEN, TIME_T_FMT, p->state->bl_time); } @@ -752,7 +752,7 @@ static u_char *ngx_http_proxy_log_proxy_state(ngx_http_request_t *r, *buf++ = '-'; } else { - buf += ngx_snprintf((char *) buf, NGX_TIME_T_LEN, + buf += ngx_snprintf((char *) buf, TIME_T_LEN, TIME_T_FMT, p->state->expires); } diff --git a/src/http/ngx_http_request.c b/src/http/ngx_http_request.c index 8ce73cfeb..4bff8cc8a 100644 --- a/src/http/ngx_http_request.c +++ b/src/http/ngx_http_request.c @@ -1463,7 +1463,7 @@ static void ngx_http_set_lingering_close(ngx_http_request_t *r) rev = c->read; rev->event_handler = ngx_http_lingering_close_handler; - r->lingering_time = ngx_cached_time + clcf->lingering_time / 1000; + r->lingering_time = ngx_time() + clcf->lingering_time / 1000; ngx_add_timer(rev, clcf->lingering_timeout); if (ngx_handle_level_read_event(rev) == NGX_ERROR) { @@ -1526,7 +1526,7 @@ static void ngx_http_lingering_close_handler(ngx_event_t *rev) return; } - timer = r->lingering_time - ngx_cached_time; + timer = r->lingering_time - ngx_time(); if (timer <= 0) { ngx_http_close_request(r, 0); ngx_http_close_connection(c); |
