tech-userlevel archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

Re: Dynamic content with bozohttpd



On Fri, 11 Oct 2013, Marc Balmer wrote:
Presenting Lua support for httpd.

This looks good.  I have the following comments:

1. Please keep white space changes separate from functional changes.

2. It needs documentation. In particular, an explanation is needed for the way requests like http://hostname/rest/printenv are handled by recognising "rest" from the "-L" command line option and recognising "printenv" from the httpd.register_handler call performed inside the printenv.lua script.

3. For requests like "http[s]://<hostname>/<prefix>/<handler>/<subpath>?<query>", if the handler wants to get at the <subpath> part of the request, then it has to do its own string manipulation, stripping off the prefix and handler name from the REQUEST_URL. I think that this would be better done once in the bozo_process_lua() function, not duplicated in every handler. Passing the <handler> string in the
Lua environment would probably also be useful.

4. I'd usually prefer to have positive options like WITH_LUA_SUPPORT instead of negative options like NO_LUA_SUPPORT. On the other hand, existing practice in this program is to use negative options, so following that precedent is probably best.

--apb (Alan Barrett)


Home | Main Index | Thread Index | Old Index