New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[bug] the upstream-response-time value is wrong #206
Comments
@WALL-E Please provide a standalone and minimal example that we can run on our side to reproduce the issue. Your example is not complete. |
I run openresty on docker, the following is a complete configuration file nginx.conf
Additional
if need, i can provide compose YML. |
@WALL-E Please make it minimal and complete. I have no idea about those |
Steps To Reproduce
wrong valueupstream-response-time: 1478919645.596 |
I test openresty/1.9.7.1, there are also the same issue. |
@WALL-E Okay, I see what's going on here. Basically, what you are seeing is the expected value. It is the timestamp of the beginning of the upstream response when the upstream response is not fully received. Because you read the To get what you want in that header filter handler, you need to do the math yourself, as in local resp_time_so_far = ngx.now() - ngx.var.upstream_response_time |
@WALL-E To get the full response time, you need to read |
@agentzh thks, I got it. Sorry, I forgot about phase |
I want to get
upstream-response-time
value by lua-script, but returned wrong value, inconsistent with the official website of the document descriptionlua script
response header
openresty version
The text was updated successfully, but these errors were encountered: