mirror of
https://github.com/discourse/discourse.git
synced 2025-03-21 04:55:46 +08:00
correct tracking of x runtime
This commit is contained in:
parent
54dc191a91
commit
8bf91b8dca
@ -138,8 +138,8 @@ class Middleware::RequestTracker
|
||||
result = @app.call(env)
|
||||
info = MethodProfiler.stop
|
||||
# possibly transferred?
|
||||
if info
|
||||
env["X-Runtime"] = "%0.6f" % info[:total_duration]
|
||||
if info && (headers = result[1])
|
||||
headers["X-Runtime"] = "%0.6f" % info[:total_duration]
|
||||
end
|
||||
result
|
||||
ensure
|
||||
|
Loading…
x
Reference in New Issue
Block a user