]> git.kaiwu.me - nginx.git/commitdiff
fix $request_time for subrequests
authorIgor Sysoev <igor@sysoev.ru>
Wed, 28 Jul 2010 15:51:50 +0000 (15:51 +0000)
committerIgor Sysoev <igor@sysoev.ru>
Wed, 28 Jul 2010 15:51:50 +0000 (15:51 +0000)
src/http/ngx_http_core_module.c

index b4b86a755f15e75f226db86f2f63d34d9353189c..f7bb55d5e373d20f26a629ac015ba25b3a66dc0f 100644 (file)
@@ -2152,6 +2152,7 @@ ngx_http_subrequest(ngx_http_request_t *r,
     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 *r,
 
     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++;