httpd_config.lua revision c381599e85eb318a270f3e3b07851bff77e5c151
cc84fd46f356c4a36a721ab135a33ec77c93e34dJakub Hrozek-- require 'string'
cc84fd46f356c4a36a721ab135a33ec77c93e34dJakub Hrozekfunction configure(cmd, dir)
cc84fd46f356c4a36a721ab135a33ec77c93e34dJakub Hrozek dir:match_handler {
cc84fd46f356c4a36a721ab135a33ec77c93e34dJakub Hrozek pattern = "^/server-says-hi$",
cc84fd46f356c4a36a721ab135a33ec77c93e34dJakub Hrozek func = "handle_server_vm",
cc84fd46f356c4a36a721ab135a33ec77c93e34dJakub Hrozek scope = "server",
cc84fd46f356c4a36a721ab135a33ec77c93e34dJakub Hrozek -- options = {
cc84fd46f356c4a36a721ab135a33ec77c93e34dJakub Hrozek -- minimum_idle = 10,
cc84fd46f356c4a36a721ab135a33ec77c93e34dJakub Hrozek -- maximum_idle = 20
cc84fd46f356c4a36a721ab135a33ec77c93e34dJakub Hrozek dir:match_handler {
cc84fd46f356c4a36a721ab135a33ec77c93e34dJakub Hrozek pattern = "^/super-basic-config$",
cc84fd46f356c4a36a721ab135a33ec77c93e34dJakub Hrozek LuaMapHandler /basic /Users/brianm/src/wombat/test/htdocs/test.lua
cc84fd46f356c4a36a721ab135a33ec77c93e34dJakub Hrozek LuaMapHandler /filter/simple /Users/brianm/src/wombat/test/htdocs/filters.lua handle_simple
cc84fd46f356c4a36a721ab135a33ec77c93e34dJakub Hrozek LuaMapHandler ^/(\w+)_(\w+)$ /Users/brianm/src/wombat/test/htdocs/$1.lua handle_$2
cc84fd46f356c4a36a721ab135a33ec77c93e34dJakub Hrozek dir:match_handler {
cc84fd46f356c4a36a721ab135a33ec77c93e34dJakub Hrozek pattern = "^/simple$",
f17d26a8db285622a5cd5f21c7488b62eedc2cf8Jakub Hrozek dir:match_handler {
f17d26a8db285622a5cd5f21c7488b62eedc2cf8Jakub Hrozek func = "handle_simple"
cc84fd46f356c4a36a721ab135a33ec77c93e34dJakub Hrozek dir:match_handler {
cc84fd46f356c4a36a721ab135a33ec77c93e34dJakub Hrozek pattern = "^/(\\w+)_(\\w+)$",
cc84fd46f356c4a36a721ab135a33ec77c93e34dJakub Hrozek file = "htdocs/$1.lua",
cc84fd46f356c4a36a721ab135a33ec77c93e34dJakub Hrozek func = "handle_$2"
cc84fd46f356c4a36a721ab135a33ec77c93e34dJakub Hrozek dir:match_handler {
cc84fd46f356c4a36a721ab135a33ec77c93e34dJakub Hrozek pattern = "^/request-says-hi$",
cc84fd46f356c4a36a721ab135a33ec77c93e34dJakub Hrozek file = "/Users/brianm/src/wombat/test/htdocs/config_tests.lua",
cc84fd46f356c4a36a721ab135a33ec77c93e34dJakub Hrozek func = "handle_request_vm",
cc84fd46f356c4a36a721ab135a33ec77c93e34dJakub Hrozek scope = "request"
cc84fd46f356c4a36a721ab135a33ec77c93e34dJakub Hrozek dir:match_handler {
cc84fd46f356c4a36a721ab135a33ec77c93e34dJakub Hrozek pattern = "^/connection-says-hi$",
cc84fd46f356c4a36a721ab135a33ec77c93e34dJakub Hrozek file = "/Users/brianm/src/wombat/test/htdocs/test.lua",
2234d49c8a307ee4f11cc544c862a359f76b44adJakub Hrozek func = "handle_conn_vm",
2234d49c8a307ee4f11cc544c862a359f76b44adJakub Hrozek scope = "connection"
cc84fd46f356c4a36a721ab135a33ec77c93e34dJakub Hrozek -- dir:lua_match_handler {
cc84fd46f356c4a36a721ab135a33ec77c93e34dJakub Hrozek -- pattern = "^/once-says-hi$",
cc84fd46f356c4a36a721ab135a33ec77c93e34dJakub Hrozek -- file = "/Users/brianm/src/wombat/test/htdocs/test.lua",
2234d49c8a307ee4f11cc544c862a359f76b44adJakub Hrozek -- func = "handle_configure_server",
cc84fd46f356c4a36a721ab135a33ec77c93e34dJakub Hrozek -- scope = "tests"