On 10.04.2013 23:34, Guenter Knauf wrote:
but here's what I found so far:
- banner(), port() and started() are functions (or methods), and listed
as such below 'Built in functions'; but they are also listed as members
of request_rec (see the big table); in addition started() gives
certainly not seconds back but microseconds
- add_version_component() doest work for me (on NetWare) but gives:
Error: attempt to call method 'add_version_component' (a nil value)
- the sample docu for r:stat() is wrong: info.modified -> info.mtime
- I get strange time values back from r:stat() on NetWare
- r:expr(string) sample uses %{HTTP_HOST}, but that doesnt work for me
one more issue I saw:
- r.module_info() returns directives where the closing tag is missing,
f.e.:
<Directory
instead of:
<Directory>
I've now tested on Windows, and I can see all previously mentioned
issues there too; in addition the attached script which works fine on
NetWare crashes the Windows httpd ...
Gregg, do you see same, and if so can you perhaps capture debug info and
post here?
Gün.
--[[
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( string.format("%s=%q\n", key, tostring(val)) )
end
r:puts( string.format("\nPowered by %s on %s\n", _VERSION, r:banner()) )
end