CL-HTTP Features

The server supports a full range of features.

It can serve images like:

Yosemite Valley.

It can serve audio like Sound Bite.

It can serve video like Video Bite.

You can compute and generate HTML dynamically using computed URLs and the HTML generation tools, e.g., View Headers.

It can export whole directories of text, html or multimedia at single directory level or recursively. See CL-HTTP Distribution or standards related to the World Wide Web. Directory exports can be eager or lazy (the default) as needed for start-up time requirements and DNS speed.

Standard abstractions can be adapted to compute pages of interest, such as Basic Icons.

Common Lisp source code directories are also conveniently exported:

  1. Configuration Examples
  2. Portable Server Sources
  3. Macintosh Sources
  4. Allegro Sources
  5. LispWorks Sources
  6. Lucid Sources
  7. Symbolics Sources

The object-oriented architecture spans URLs, exceptional conditions, server instances, as well as authentication objects. See basic class structure.

Fill-out Forms and search URLs provide a convenient way to accept user input to functions that compute responses to requests. For example, response functions defined in http:examples;exports.lisp allow you to:

Dynamic computation of fill-out forms allows the queries asked to vary according to the data driving an application such as Computed Form.

Input types provide a high-level abstraction for eliciting user input using the full power of the HTML 2.0 fill-out form facility. The Input Type System is a basic presentation system that has is upward compatible with the Common Lisp Interface Manager in the Lisp Machine version. See HTML:ACCEPT-INPUT.

A modular and extensible logging facility allows Server Log Files to be maintained in any of several formats, including common logfile format. The variable http:*log-access-log-class* controls the format used. It possible to have multiple logs on a single port or different log formats on different ports. .

IP Subnet security is available globally for the entire server and locally for specific URLS. See HTTP:EXPORT-URL.

Usernames and passwords are available for user authentication, using both the basic and digest authentication methods. View Realms shows the defined realms, users, groups, URL access groups, but you must know the Webmaster password for the server and your browser must support Digest Authentication. See http:examples;access-control.lisp.

Conditional GET is implement so that caching proxy servers can merely check the headers of a document to see if it has changed rather than reloading it when its expiration time arrives. User control is available via the expiration arguments to HTTP:EXPORT-URL.

The server can export image maps and supports both the NCSA and CERN file formats.

Direct image searches allow a response function to invoke functionality based on the coordinates of a mouse click. See: HTML:IMAGE and try clicking on:

Netscape 1.1 extensions to HTML 2.0 are implemented by http:server;netscape-1-1.lisp. The implementation includes Server Push and Client Pull (see discussion). Choose Color Schemes illustrates server push, tables, and multipart MIME generation (see http:examples;exports.lisp).

Netscape 2.0 HTML 3.0 extensions include client-side images and frames. CL-HTTP writes client-side image maps from server-side image maps with ns2.0:with-client-image-map. Direct control is available with ns2.0:with-client-image-map. Either way, the name client-side image maps can be invoked with ns2.0:image. Lisp examples that generate client-side image maps and frames are available in http:examples;exports.lisp. For further information, see the full set of Netscape 2.0 HTML operators.

HTML that invokes Java Applets can be synthesized with ns2.0:with-java-applet, and http:export-url knows how to export both Java source and byte code.

JavaScript scripts can be embedded in HTML streams for the Netscape 2.0 Client with ns2.0:with-embedded-script. CL-HTTP encapsulates scripts with ns2.0:define-script. Scripts can then be called by passing events constructed with ns2.0:with-event-handlers. The marquee headers page illustrates the use of these facilities. See http:examples;exports.lisp for example code.

A plug-in facility (Latest Plug-ins) is supported by the Netscape 2.0 Client. New export types and mime types are easily defined to allow CL-HTTP to serve data from files or computed on the fly for client-side plug-ins. One example is inline speech synthesis using the Talker plug-in for the Macintosh. See the example in http:examples;exports.lisp for example code.

VRML 1.0 Synthesis Tools generate 3D scenes with the Virtual Reality Modeling Language. VRML scenes can be viewed inline with a variety of plug-ins available for major browsers. The Introduction to VRML Generation works through lisp examples in http:examples;vrml;.

The W3P Presentation System provides a portable and fast subset of functionality in The Common Lisp Interface Manager, 2.0. Now, all CL-HTTP platforms can use presentation types for presenting and accepting data via HTML fill-out forms, and thus, minimize code duplication while simplifying the coding associated with Web interfaces.

Web-based server configuration allows binary images containing the server to be configured by non-programmers.

The W4 Constraint-Guided Web Walker provides a declarative architecture for control and action in a Web robot. After loading the system (see http:w4;), you can run the example. Sunil Mishra has developed a HTML parserstreamed parser for use with the web walker. The current release of W4 is considered beta test, so please report any bugs, successes, or issues to bug-w4@ai.mit.edu.

Mail archives can be exported over the Web. This mail-archive export type dynamically computes pages directly from a message archive. Consequently, the Web view is always current. See http:examples;mail-archive.lisp

Virtual Hosts are supported on a single IP address. Separate URL's are exported for virtual host and port. HTTP 1.1 conformant clients are required, e.g. Netscape 2.0.2 or higher.

PUT & DELETE Methods for HTTP 1.0 and 1.1 can now be used with clients other that the basic HTTP client that comes with the server. For example, Netscape 3.0 Gold and NaviPress support the PUT method. But first, the webmaster needs to select a security policy for side-effecting HTTP methods.

Distributed AI applications are possible using HTTP to communicate between a CL-HTTP server and client. The standard HTTP POST method is trivially used for communication between remote Lisp processes. A simple example is available in http:examples;client.lisp.

Client-side cookies allow an application to maintain user state across HTTP transactions or user sessions.

John C. Mallery -- jcma@ai.mit.edu
M.I.T. Artificial Intelligence Laboratory