Skip to content

Commit eb728cf

Browse files
committed
added sor and micros routing vars
1 parent 7569544 commit eb728cf

File tree

1 file changed

+8
-0
lines changed

1 file changed

+8
-0
lines changed

core/routing.c

+8
Original file line numberDiff line numberDiff line change
@@ -1778,6 +1778,10 @@ static char *uwsgi_route_var_uwsgi(struct wsgi_request *wsgi_req, char *key, uin
17781778
ret = uwsgi_64bit2str(wsgi_req->response_size);
17791779
*vallen = strlen(ret);
17801780
}
1781+
else if (!uwsgi_strncmp(key, keylen, "sor", 3)) {
1782+
ret = uwsgi_64bit2str(wsgi_req->start_of_request);
1783+
*vallen = strlen(ret);
1784+
}
17811785

17821786
return ret;
17831787
}
@@ -1814,6 +1818,10 @@ static char *uwsgi_route_var_time(struct wsgi_request *wsgi_req, char *key, uint
18141818
ret = uwsgi_num2str(uwsgi_now());
18151819
*vallen = strlen(ret);
18161820
}
1821+
else if (!uwsgi_strncmp(key, keylen, "micros", 6)) {
1822+
ret = uwsgi_64bit2str(uwsgi_micros());
1823+
*vallen = strlen(ret);
1824+
}
18171825
return ret;
18181826
}
18191827

0 commit comments

Comments
 (0)