webmcp

diff framework/env/request/handler.lua @ 262:c3d539e33710

Replaced request.add_initializer(...) and request.add_variable(...) with request.for_each(...) and request.configure(...) which both execute the passed function once in any case when being called
author jbe
date Tue Mar 17 11:42:34 2015 +0100 (2015-03-17)
parents 46f0083889a9
children 8aa38ddcc1b2
line diff
     1.1 --- a/framework/env/request/handler.lua	Mon Mar 16 23:21:18 2015 +0100
     1.2 +++ b/framework/env/request/handler.lua	Tue Mar 17 11:42:34 2015 +0100
     1.3 @@ -21,10 +21,9 @@
     1.4  function request.handler(http_request)
     1.5    _G.app = {}  -- may be overwritten or modified by request initializers
     1.6    do
     1.7 -    local first = not request._in_progress
     1.8      request._in_progress = true  -- NOTE: must be set to true before initializer functions are called
     1.9      for i, func in ipairs(request._initializers) do
    1.10 -      func(first)
    1.11 +      func()
    1.12      end
    1.13    end
    1.14  

Impressum / About Us