Mathweb - HTTP Server

Andreas Franke

provides
~/.oz/bin/ozhttpd
x-ozlib://mathweb/ozhttpd.exe
x-ozlib://mathweb/httpd/HttpClient.ozf
x-ozlib://mathweb/httpd/HttpHandler.ozf
x-ozlib://mathweb/httpd/SampleHandlers.ozf
x-ozlib://mathweb/httpd/Http.ozf
x-ozlib://mathweb/httpd/HttpCodes.ozf
x-ozlib://mathweb/httpd/HttpRequest.ozf
x-ozlib://mathweb/httpd/MimeTypes.ozf
x-ozlib://mathweb/httpd/mime.types.ozf.static
requires
x-ozlib://mathweb/share/File.ozf
x-ozlib://mathweb/share/Internet.ozf
x-ozlib://mathweb/share/XTime.ozf
x-ozlib://mathweb/html/Html.ozf
x-ozlib://mathweb/html/Buffered.ozf

Purpose

This is a simple HTTP server. It aims to conform with HTTP 1.0, but probably still has a few bugs. You can add and remove handlers dynamically, but there is no support for CGI scripts yet.

An HttpHandler class must inherit from

        HttpHandler('class')
        at 'x-ozlib://mathweb/httpd/HttpHandler.ozf'
It must implement the following method:
        meth handle(UriInContext Request Connection)
           ...
        end
UriInContext is the derived from the URI of the Request by dropping the context path prefix. E.g. if the request uri is /foo/bar?baz=example and the handler has been registered at /foo/* then UriInContext will be equal to {URL.make "/bar?baz=example"}

Installation

This package can be installed by following the usual configure, build, install procedure, i.e. by executing a the shell: ./configure make install By default, all files of the package are installed in the user's ~/.oz directory tree. In particular, all modules are installed in the user's private cache.

Examples


Omega Homepage - MathWeb Hompage