lua-users home
lua-l archive

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


On Saturday 21 January 2006 9:39 am, Jeff Sheets wrote:
> In my search for a CGILua solution that provides SSL support, I made
> some changes to the Xavante Web server code. In order to provide support
> for listening on multiple ports, one has to issue multiple
> xavante.HTTP{...} commands in config.lua. Unfortunately, stock Xavante
> (as of Kepler-1.0b) does not save all the servers' ports.  Instead it
> only stores the last one to be configured.  So if your config.lua file
> has two xavante.HTTP commands, CGI scripts run by BOTH servers will use
> the server port of the last one to be configured.  If the two servers
> listen on different addresses but the same port, this is okay. If The
> two servers listen on the same addresses but differing ports, any CGI
> code run will not be able to tell which server is actually running the
> script.

you're right, the port number is stored in a global variable; it's a relic 
from past architectures, it has to go.  your solution seems quite correct, 
but i think it should be more generalized; i'll look at it tonight.

in any case, if you want to have different responses according to the server 
instance, you should create different handler objects.  even if it's the same 
handler (CGILua in your case), use a different instance having different 
parameters for each server.

thanks for the feedback

-- 
Javier

Attachment: pgpJXghEMtOOF.pgp
Description: PGP signature