Lynn wrote regarding the Mosquito distribution:

> I have been busy looking at some CGI options myself lately. :)

<soapbox>Personally, I think there's something fundamentally wrong with
managing a firewall/router through a web-based interface, but it seems that
I'm the only one who feels this way...</soapbox>

I've been working on and off on integrating lua into a web server to provide
an inline embedded scripting language, similar to PHP.  For example:

<TITLE>Configuration page for <? readfrom("|/bin/hostname")
                         x=read("*a")
                         hostname=strsub(x,0,(strlen(x)-1)) 
                         x=nil
                         write (hostname)       
                        ?></TITLE>
...

<H1>Configuration page for <? write(hostname) ?></H1>

The above generates a web page that "knows" the local hostname... you get
the idea (I hope.) I got micro_httpd working, but it only supports GET
requests, so I switched to working with mini_httpd.  GET requests work, but
I'm still working on the correct approach for POSTS...

Advantages I see to this approach are:

        Let the web server handle the access control, logging, etc.  (better
security)
        web pages should be more portable across the LEAF distributions
        mini_httpd can be built with SSL support, if desired
        inline-scripting is cool

Disadvantages mainly involve size:
        The statically-linked lua library adds 50-70K to the web server
code; lua-enabled mini_httpd is just under 100K in size. (UPX gets it to
less than half of that, though).   

        
Does anyone out there see a need/use for this kind of thing?  Or do you
think the standard CGI scripting is fine?  (I do realize you can fit alot of
weblet pages in 100K)


_______________________________________________
Leaf-devel mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/leaf-devel

Reply via email to