{"action":"created","issue":{"url":"https://api.github.com/repos/openresty/openresty/issues/206","repository_url":"https://api.github.com/repos/openresty/openresty","labels_url":"https://api.github.com/repos/openresty/openresty/issues/206/labels{/name}","comments_url":"https://api.github.com/repos/openresty/openresty/issues/206/comments","events_url":"https://api.github.com/repos/openresty/openresty/issues/206/events","html_url":"https://github.com/openresty/openresty/issues/206","id":188223025,"number":206,"title":"[bug] the upstream-response-time value is wrong","user":{"login":"WALL-E","id":736927,"avatar_url":"https://avatars.githubusercontent.com/u/736927?v=3","gravatar_id":"","url":"https://api.github.com/users/WALL-E","html_url":"https://github.com/WALL-E","followers_url":"https://api.github.com/users/WALL-E/followers","following_url":"https://api.github.com/users/WALL-E/following{/other_user}","gists_url":"https://api.github.com/users/WALL-E/gists{/gist_id}","starred_url":"https://api.github.com/users/WALL-E/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/WALL-E/subscriptions","organizations_url":"https://api.github.com/users/WALL-E/orgs","repos_url":"https://api.github.com/users/WALL-E/repos","events_url":"https://api.github.com/users/WALL-E/events{/privacy}","received_events_url":"https://api.github.com/users/WALL-E/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":7,"created_at":"2016-11-09T11:19:04Z","updated_at":"2016-11-12T04:33:55Z","closed_at":null,"body":"I want to get `upstream-response-time` value by lua-script,  but returned wrong value, inconsistent with the official website of the document description\r\n\r\n\r\n## lua script\r\n\r\n```\r\nheader_filter_by_lua_block {\r\n                ngx.header[\"upstream_addr\"] = ngx.var.upstream_addr\r\n                ngx.header[\"upstream_connect_time\"] = ngx.var.upstream_connect_time\r\n                ngx.header[\"upstream_header_time\"] = ngx.var.upstream_header_time\r\n                ngx.header[\"upstream_response_time\"] = ngx.var.upstream_response_time\r\n            }\r\n```\r\n\r\n## response header\r\n\r\n```\r\n...\r\nupstream-addr: 172.17.0.2:80\r\nupstream-connect-time: 0.000\r\nupstream-header-time: 0.000\r\nupstream-response-time: 1478689090.993\r\n...\r\n```\r\n\r\n## openresty version\r\n\r\n```\r\nnginx version: openresty/1.11.2.1\r\nbuilt by gcc 4.8.5 20150623 (Red Hat 4.8.5-4) (GCC)\r\nbuilt with OpenSSL 1.0.1e-fips 11 Feb 2013\r\nTLS SNI support enabled\r\nconfigure arguments: --prefix=/opt/openresty/nginx --with-cc-opt=-O2 --add-module=../ngx_devel_kit-0.3.0 --add-module=../echo-nginx-module-0.60 --add-module=../xss-nginx-module-0.05 --add-module=../ngx_coolkit-0.2rc3 --add-module=../set-misc-nginx-module-0.31 --add-module=../form-input-nginx-module-0.12 --add-module=../encrypted-session-nginx-module-0.06 --add-module=../srcache-nginx-module-0.31 --add-module=../ngx_lua-0.10.6 --add-module=../ngx_lua_upstream-0.06 --add-module=../headers-more-nginx-module-0.31 --add-module=../array-var-nginx-module-0.05 --add-module=../memc-nginx-module-0.17 --add-module=../redis2-nginx-module-0.13 --add-module=../redis-nginx-module-0.3.7 --add-module=../rds-json-nginx-module-0.14 --add-module=../rds-csv-nginx-module-0.07 --with-ld-opt=-Wl,-rpath,/opt/openresty/luajit/lib --with-http_realip_module --with-http_ssl_module\r\n```"},"comment":{"url":"https://api.github.com/repos/openresty/openresty/issues/comments/260101266","html_url":"https://github.com/openresty/openresty/issues/206#issuecomment-260101266","issue_url":"https://api.github.com/repos/openresty/openresty/issues/206","id":260101266,"user":{"login":"agentzh","id":56241,"avatar_url":"https://avatars.githubusercontent.com/u/56241?v=3","gravatar_id":"","url":"https://api.github.com/users/agentzh","html_url":"https://github.com/agentzh","followers_url":"https://api.github.com/users/agentzh/followers","following_url":"https://api.github.com/users/agentzh/following{/other_user}","gists_url":"https://api.github.com/users/agentzh/gists{/gist_id}","starred_url":"https://api.github.com/users/agentzh/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/agentzh/subscriptions","organizations_url":"https://api.github.com/users/agentzh/orgs","repos_url":"https://api.github.com/users/agentzh/repos","events_url":"https://api.github.com/users/agentzh/events{/privacy}","received_events_url":"https://api.github.com/users/agentzh/received_events","type":"User","site_admin":false},"created_at":"2016-11-12T04:33:55Z","updated_at":"2016-11-12T04:33:55Z","body":"@WALL-E To get the full response time, you need to read `$upstream_response_time` in the log phase instead, where the response is fully generated."}}
{"actor":{"display_login":"agentzh"}}