Request time

Is it possible to add a header to the client, that says how long the
request
takes?
Examplo, I have nginx proxyng to php using the default:

location ~ .php$ {
fastcgi_pass 127.0.0.1:9000;
fastcgi_index index.php;
include fastcgi_params;
}

after the proxy complete, I would like to add a header called
PHP-Request-Time with the execution duration in milliseconds, like this:
PHP-Request-Time 230ms

How? Is that a good idea? I took that from Pushion Passenger (mod_rails
to
Apache 2)

after the proxy complete, I would like to add a header called
PHP-Request-Time with the execution duration in milliseconds, like
this:
PHP-Request-Time 230ms

The problem is that it’d need to know the full request time before it
finishes sending headers and begins sending data, so it’d have to buffer
every request.

I’d suggest that you add the request time to your log files instead.

Regards,
Erek Dyskant

You mean using php code inside my application?