Announce: new HTTP interface

Bill Eldridge <[email protected]>
Newsgroups gmane.comp.video.videolan.vls.devel
Organization Radio Free Asia
Message-ID <[email protected]>
Due to overwhelming demand and a torrent
of responses, I've now added cookie handling
to my Web interface in addition to GET and POST
handling. This helps, because you don't have
to re-enter your user/password info once the
cookie is set. (okay, it's clear text, not
secure and doesn't remember expiration date
even though it "handles" it). It also makes
it easy to have a Web form you click with
something like:

<form method=POST action="http://localhost:9997/forminput>
<p>User: <input type=text name=user>
<p>Password: <input type=text name=password>
<p> Name: <input type=text name=name>
<p> Command: <input type=text name=command>
<p> <input type=submit>
</form>

to access the admin stuff.

The only command I've tested with so
far is "browse". Shouldn't be a problem
to augment to handle the rest of the
vls commands.

Two versions are available, one is
http.cpp/.h which requires all the
references to telnet/Telnet/TELNET in
admin.cpp/.h be copied to http/Http/HTTP,
and browser.cpp/.h, Makefile & vls.cfg
slightly edited.

The second is pretty much a drop-in for
the current telnet.cpp, with only a change
to browser.cpp/.h.

http://techweb.rfa.org/staff/bill/

Regards,
Bill

P.S. I'm sure the code will be considered
a bit ugly, but it also throws all the
various variables into maps, so you can
retrieve things like:

     if (envpath["command"] == "browse")....

-- 
Bill Eldridge
Radio Free Asia
[email protected]



-- 
This is the vls-devel mailing-list, see http://www.videolan.org/vls-devel/
To unsubscribe, please read http://www.videolan.org/lists.html
If you are in trouble, please contact <[email protected]>
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.