{"issue":{"created_at":"2011-12-07T15:55:04Z","state":"open","updated_at":"2011-12-07T16:01:54Z","user":{"gravatar_id":"50d1836f87c02e297a5f6b75a684e1e0","id":1174514,"url":"https://api.github.com/users/pkeenatemma","login":"pkeenatemma","avatar_url":"https://secure.gravatar.com/avatar/50d1836f87c02e297a5f6b75a684e1e0?d=https://a248.e.akamai.net/assets.github.com%2Fimages%2Fgravatars%2Fgravatar-140.png"},"comments":1,"body":"I'm playing around with lua nginx and I've come across kind of a weird bug, if it actually is a bug. I can't seem to get set_by_lua to work. It doesn't appear to have a populated ngx table. Am I doing something wrong?\r\n\r\nVersion:\r\n\r\n    nginx: nginx version: ngx_openresty/1.0.9.10\r\n\r\nConfig:\r\n\r\n    worker_processes  1;\r\n    error_log logs/error.log;\r\n    events {\r\n        worker_connections 1024;\r\n    }\r\n    http {\r\n        server {\r\n            listen 8080;\r\n            location /works {\r\n                content_by_lua 'ngx.say(\"hi\")';\r\n            }\r\n            location /does_not_work {\r\n                set_by_lua $loc 'ngx.say(\"hi\")';\r\n                echo $loc;\r\n            }\r\n        }\r\n    }\r\n\r\nError:\r\n\r\n    2011/12/07 07:52:13 [error] 56498#0: *48 (lua-error) [string \"content_by_lua\"]:1: attempt to call field 'say' (a nil value), client: 127.0.0.1, server: , request: \"GET /does_not_work HTTP/1.1\", host: \"localhost:8080\"\r\n\r\n","assignee":null,"number":74,"pull_request":{"patch_url":null,"html_url":null,"diff_url":null},"id":2476069,"labels":[],"title":"set_by_lua and set_by_lua_file do not have ngx","html_url":"https://github.com/chaoslawful/lua-nginx-module/issues/74","closed_at":null,"url":"https://api.github.com/repos/chaoslawful/lua-nginx-module/issues/74","milestone":null},"action":"created","comment":{"created_at":"2011-12-07T16:01:54Z","updated_at":"2011-12-07T16:01:54Z","user":{"gravatar_id":"a823b0601776070b345e2f8ce44b5337","id":56617,"url":"https://api.github.com/users/chaoslawful","login":"chaoslawful","avatar_url":"https://secure.gravatar.com/avatar/a823b0601776070b345e2f8ce44b5337?d=https://a248.e.akamai.net/assets.github.com%2Fimages%2Fgravatars%2Fgravatar-140.png"},"body":"No, you can't do I/O operations in a set_by_lua context.","id":3048950,"url":"https://api.github.com/repos/chaoslawful/lua-nginx-module/issues/comments/3048950"}}