Exporting URLs in CL-HTTP


HTTP:EXPORT-URL is the primary method that exports URLs, and thereby, makes them accessible via the HTTP server. HTTP:EXPORT-URL takes arguments URL, EXPORT-TYPE. The URL argument is either a string or an interned URL. EXPORT-TYPE is the method to use in exporting URL. EXPORT-TYPE also determines a set of additional arguments which are explained below. HTTP:DEFINE-URL-EXPORTS allows many URLs to be exported at once. HTTP:UNEXPORT-URL makes an exported URL inaccessible via the HTTP server.

  1. Basic Export Types: These involve making the contents of a file accessible via a URL. These types require URLs that are objects (i.e., have a name and extension).

  2. Directory Export Types: These export all the files in a directory or a directory hierarchy when RECURSIVE-P is non-null. The most general export type, :DIRECTORY, exports all files whose resource type is known. Others export a specific content type, and ignore other file types.

    When HTTP:*AUTO-EXPORT* is non-null, new files are automatically exported when they are scoped by one of these directory export types. Auto-export occurs on demand for the GET and HEAD methods of HTTP.

    Note that the presence in file or directory names of escaped characters (see HTTP:*ESCAPED-CHARACTERS*) will lead to inconsistent results, and possibly errors. Space and question mark are examples.

  3. Redirect Export Types: These inform the client to look elsewhere for a URL. They work for the GET and HEAD operations. The exported URL can be either an HTTP object or an HTTP path.

  4. Search Export Types: These involve performing searches using the search index or map search facilities in HTTP. Search URLs must end with ? so that the system can composed the right combination of classes. In all cases, the response function must compute the answer and return HTML over the http stream to the client.

  5. Computed URLs: These compute responses returned to clients.

  6. Expiration: The expiration time for a url is issued as an EXPIRES header so that proxy servers can determine when they need to refresh their cache. Expiration is controlled by providing the :EXPIRATION keyword argument when exporting any URL. If expiration is not provided, the default is no expiration date. The :EXPIRATION keyword takes one argument, which is either keyword or a list of (keyword &rest arguments). The following expiration arguments are handled:

  7. Subnet Security: Global and local mechanisms are available for controlling subnet access based on IP address.

  8. Documentation: Keywords and a descriptive string can be attached to URLs at export time. For directory exports, note that these arguments apply to ALL URLs exported during the directory walk.

  9. Portable Exports: The #U reader macro merges a partial URL specification against the default for the local host. Use this when you be able to load the same exports file on different hosts.

  10. Defining Static Export Types: New static export types for data stored in files can be defined with DEFINE-URL-EXPORT-TYPE.