[Sputnik-list] Bug in sputnik + xavante/wsapi

Jim Whitehead II jnwhiteh at gmail.com
Fri Jul 18 07:52:58 GMT+2 2008


On Thu, Jul 17, 2008 at 2:47 PM, Enrico Tassi <gareuselesinge at libero.it> wrote:
> Hi,
>  I'm experiencing a nasty bug using sputnik on top of xavante. The bug is
> really nasty since many factors contribute to it. I belive it has
> something to do with the load_isolated_launcher in wsapi.common.
>
> It seems to try to reuse states to speedup the application loading
> and if (app_state.mtime == mtime) no reload operation is performed.
> Changing this test to fale (always call bootstra_app) solves the issue,
> but I'm pretty sure It can not be that wrong thus I must be missing
> something...
>
> The bug is easy to reproduce on my setup, just edit a page (like the
> configuration file) and change the main colour of sputnik... The
> modification does not apply, repeatedly reloading the page gives
> sometimes the expected result (the new color shows up) but not always,
> while restarting xavante or touching sputnik.ws makes the modification
> "stable". The bug is even nastries sometimes, since realoding may lead
> the user to loose autentication (like if it was reusing a previous state
> in which the user had not log in yet...).
>
> I've not tried sputnik on top of Apache, but I'll do soon to understand
> if the problem is wsapi of wsapi+xavante/rings. Not sure it is
> important, but I'm not using luarocks.require (but I'm using the very
> same software that luarocks installed, I've just copied it in the right
> path so that no luarocks.require is needed).

There is a flag that can be set in the xavante handler that allows you
to bypass this caching.  In xavante/config.lua you can change the
following line:

    { -- wsapihandler example
      match = {"%.ws$", "%.ws/" },
      with = wsapi.xavante.makeGenericHandler (webDir)
    },

to

    { -- wsapihandler example
      match = {"%.ws$", "%.ws/" },
      with = wsapi.xavante.makeGenericHandler (webDir, true)
    },

This was added by Fabio specifically for this reason [1].

Cheers!

[1]: http://lists.luaforge.net/pipermail/kepler-project/2008-April/002515.html



More information about the Sputnik-list mailing list