From 3e5493259eac999a5b347bbd695a3d2e441dc496 Mon Sep 17 00:00:00 2001 From: Unbit Date: Thu, 28 May 2015 12:24:03 +0200 Subject: [PATCH] added sor and micros routing vars --- core/routing.c | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/core/routing.c b/core/routing.c index 1d8ef8d5..dbc074e2 100644 --- a/core/routing.c +++ b/core/routing.c @@ -1778,6 +1778,10 @@ static char *uwsgi_route_var_uwsgi(struct wsgi_request *wsgi_req, char *key, uin ret = uwsgi_64bit2str(wsgi_req->response_size); *vallen = strlen(ret); } + else if (!uwsgi_strncmp(key, keylen, "sor", 3)) { + ret = uwsgi_64bit2str(wsgi_req->start_of_request); + *vallen = strlen(ret); + } return ret; } @@ -1814,6 +1818,10 @@ static char *uwsgi_route_var_time(struct wsgi_request *wsgi_req, char *key, uint ret = uwsgi_num2str(uwsgi_now()); *vallen = strlen(ret); } + else if (!uwsgi_strncmp(key, keylen, "micros", 6)) { + ret = uwsgi_64bit2str(uwsgi_micros()); + *vallen = strlen(ret); + } return ret; }