diff options
Diffstat (limited to 'src/http/modules')
-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 |
3 files changed, 9 insertions, 11 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); } |