On 4/12/2013 10:43 AM, Guenter Knauf wrote:
I know; but I dont know if Gregg did a release or debug build;
I've heard a couple of times in the past that folks were not able to
re-create crash with debug builds but which happen with release builds;
that could f.e. explain why Daniel doesnt see the issue with his debug
build.
This seems to be the case.
The attached lua script crashes on a Release build, but succeeds on a
Debug build.
Regards,
Gregg
--[[
This is the default method name for Lua handlers, see the optional
function-name in the LuaMapHandler directive to choose a different
entry point.
--]]
local iter = { "allowoverrides", "ap_auth_type", "ap_auth_type", "args",
"assbackwards", "auth_name", "banner", "basic_auth_pw",
"canonical_filename", "content_encoding", "content_type",
"context_prefix", "context_document_root", "document_root",
"err_headers_out", "filename", "handler", "headers_in",
"headers_out", "hostname", "is_https", "is_initial_req",
"limit_req_body", "log_id", "method", "notes", "options",
"path_info", "port", "protocol", "proxyreq", "range",
"remaining", "server_built", "server_name",
"some_auth_required", "subprocess_env", "started", "status",
"the_request", "unparsed_uri", "uri", "user", "useragent_ip"
}
function iterator (obj)
local i=1
return function ()
local key = iter[i]
if key == nil then return end
i = i + 1
return key,obj[key]
end
end
function handle(r)
r.content_type = "text/plain"
for key,val in iterator(r) do
r:puts( ("%s=%q\n"):format(key, tostring(val)) )
end
r:puts( ("\nPowered by %s on %s\n"):format(_VERSION, r:banner()) )
end