On Tue, Dec 15, 2009 at 3:51 PM, steve donovan
<[email protected]> wrote:
> On Tue, Dec 15, 2009 at 7:25 PM, Fabio Mascarenhas
> > prefix = "/cgi-bin/toycms.cgi"
>
> OK, I had to disable the cache to get the change recognized, and now
> we're getting URLs like:
>
> http://127.0.0.1:8080/cgi-bin/toycms.cgi/post/51
>
> Which is not an error, but just gives the index again, the '/post/51'
> bit is not considered when evaluating the script. From other CGI apps
> I know that something like '?var=' is needed to pass stuff to the
> script, so this URL just looks wrong to me.
Orbit apps usually get their data from PATH_INFO, which is the
'/post/51' bit. Maybe your Apache is messing PATH_INFO somehow, but
this is highly unusual, I have never seen happen under Linux. You can
try running a simpler script, such as this one:
-----
require "wsapi.cgi"
wsapi.cgi.run(function (wsapi_env)
local function response()
coroutine.yield("<html><body>\n")
coroutine.yield("SCRIPT_NAME: " .. wsapi_env.SCRIPT_NAME .. "</br>\n")
coroutine.yield("PATH_INFO: " .. wsapi_env.PATH_INFO .. "</br>\n")
coroutine.yield("</body></html>\n")
end
return 200, ["Content-Type"] = "text/html", coroutine.wrap(response)
end)
-----
To see what Apache is giving to your app.
>> .ws files are executable, then point your browser to
>> http://host/toycms/toycms.ws.
>
> I will try this, thanks.
>
> steve d.
>
--
Fabio Mascarenhas
_______________________________________________
Kepler-Project mailing list
[email protected]
http://lists.luaforge.net/cgi-bin/mailman/listinfo/kepler-project
http://www.keplerproject.org/