Just created (and attached) a newer version of my HTTP 
server object.
Instead of directly overriding the method handlers during object creation
you can put a handler in a %handlers directory. Upon start-up the server
scans that directory looking for %init.r, %get.r, %post.r, %head.r, and
%put.r files. It will replace its default handlers with the appropriate
files. I'm attaching the new object along with a sample get.r file. 
                                This get.r serves html files, images, etc. from a %www 
directory,
i.e. it behaves like a normal webserver. As one can see, it didn't take
much code to implement that functionality on top of the base server object. 
                                The HTTP server object itself is meant to be sort of a 
black box. Any
code to extend the server should go in the handlers. (get.r probably
being the most common one folks would want to change, probably followed
by post.r) The HTTP server object handles multiple connections and has
separate queues for reading and writing to those connections. 
                                Incidentally, you can change the handlers on the fly 
while the server
is running by visiting the /refresh url. It causes the get.r etc.
handlers to be reloaded.  /shutdown causes the server to shutdown and
cleanup. These both cause 404s to be returned by the above get.r. I'll
probably fix that in the next rev.
                                One the server object has solidified, I'm going to 
start adding some
layers on top to facilitate the creation of web application servers. XML-
RPC support is somewhat high on the list of features I'd like to implement.

Some comments would be welcome :)
:Eric

get.r

httpobject.r

Reply via email to