aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorIgor Sysoev <igor@sysoev.ru>2010-07-28 15:51:50 +0000
committerIgor Sysoev <igor@sysoev.ru>2010-07-28 15:51:50 +0000
commit14c95f99ac8f7e5b99e81e91f8f919e498fd50b4 (patch)
treecf0ecdee948012cecf90a9f39ba69f45d67d07d9
parent406a68003cfc3b9907bd40699c4a51df4cee3a5a (diff)
downloadnginx-14c95f99ac8f7e5b99e81e91f8f919e498fd50b4.tar.gz
nginx-14c95f99ac8f7e5b99e81e91f8f919e498fd50b4.zip
fix $request_time for subrequests
-rw-r--r--src/http/ngx_http_core_module.c5
1 files changed, 5 insertions, 0 deletions
diff --git a/src/http/ngx_http_core_module.c b/src/http/ngx_http_core_module.c
index b4b86a755..f7bb55d5e 100644
--- 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 *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++;