I am using
add_header x-responsetime $upstream_response_time;
to report response times of the back-end to the client. I was
expecting to see the back-end response time (e.g. 0.500 for half a
second), however the headers that I am getting contain an epoch
timestamp, e.g:
x-responsetime: 1392070197.589
What am I doing wrong?
On Mon, Feb 10, 2014 at 02:17:30PM -0800, Jeroen O. wrote:
What am I doing wrong?
http://mailman.nginx.org/pipermail/nginx/2012-May/033630.html
On 11.02.2014 11:04, Ruslan E. wrote:
What am I doing wrong?
http://mailman.nginx.org/pipermail/nginx/2012-May/033630.html
may be better set default value of variable $upstream_response_time
to url on site nginx.org with faq/documentation, something like this:
===================================================================
The $upstream_response_time is only meaningful once response is
fully got from upstream, and this happens after response headers
are got (and sent to client). That is, you basically can’t use
$upstream_response_time in add_header, only in logs.
===================================================================
?
or, if only number allowed, some fail-safe value, for example, -1 or 0.
–
Best regards,
Gena