diff src/http/ngx_http_core_module.c @ 590:cde3626b2d0d NGINX_0_8_47

nginx 0.8.47 *) Bugfix: $request_time variable had invalid values for subrequests. *) Bugfix: errors intercepted by error_page could be cached. *) Bugfix: a cache manager process my got caught in an endless loop, if max_size parameter was used; the bug had appeared in 0.8.46.
author Igor Sysoev <http://sysoev.ru>
date Wed, 28 Jul 2010 00:00:00 +0400
parents 53f5f04a64b8
children 09d5f308901f
line wrap: on
line diff
--- a/src/http/ngx_http_core_module.c
+++ b/src/http/ngx_http_core_module.c
@@ -2152,6 +2152,7 @@ ngx_http_subrequest(ngx_http_request_t *
     ngx_str_t *uri, ngx_str_t *args, ngx_http_request_t **psr,
     ngx_http_post_subrequest_t *ps, ngx_uint_t flags)
 {
+    ngx_time_t                    *tp;
     ngx_connection_t              *c;
     ngx_http_request_t            *sr;
     ngx_http_core_srv_conf_t      *cscf;
@@ -2264,6 +2265,10 @@ ngx_http_subrequest(ngx_http_request_t *
 
     sr->uri_changes = NGX_HTTP_MAX_URI_CHANGES + 1;
 
+    tp = ngx_timeofday();
+    r->start_sec = tp->sec;
+    r->start_msec = tp->msec;
+
     r->main->subrequests++;
     r->main->count++;