Common Lisp Package: HUNCHENTOOT-VHOST

README:

FUNCTION

Public

DISPATCH-VIRTUAL-HOST-HANDLERS (REQUEST)

The dispatch function for the vhost handlers.

MAKE-VIRTUAL-HOST (NAME HOSTS &KEY SERVER)

Creates a virtual host of the specified name that handles requests whose host suffixes match one of the specified hosts, are the single specified host if it is an string rather than a list of strings.

Undocumented

ADD-VIRTUAL-HOST (VHOST SERVER)

Private

DISPATCH-EASY-VIRTUAL-HANDLERS (REQUEST)

This is a dispatcher which returns the appropriate handler defined with DEFINE-EASY-VIRTUAL-HANDLER, if there is one.

HOST-NAME (&OPTIONAL REQUEST)

Returns just the host portion of the 'Host' incoming http header value, rather than either host or host:port if the port is specified.

HOST-NAME-AND-PORT (&OPTIONAL REQUEST)

Returns the multiple values host and port (or nil if no port is specified) of the 'Host' incoming http header value, rather than either host or host:port if the port is specified.

VIRTUAL-HOST-HANDLES (VHOST REQUEST &KEY EXACT)

Returns the name of the host handled by this virtual host whose suffix is host-name if it exists, otherwise returns NIL.

MACRO

Public

DEFINE-EASY-VIRTUAL-HANDLER (VIRTUAL-HOST DESCRIPTION LAMBDA-LIST &BODY BODY)

Defines an easy-virtual-handler for use with a given virtual-host. See hunchentoot:define-easy-handler for documentation of the description and lambda-list arguments.

SLOT-ACCESSOR

Public

VIRTUAL-HOST-DISPATCH-TABLE (OBJECT)

A list of dispatch functions to be called for this virtual host.

SETFVIRTUAL-HOST-DISPATCH-TABLE (NEW-VALUE OBJECT)

A list of dispatch functions to be called for this virtual host.

Private

VIRTUAL-HOST-EASY-HANDLER-ALIST (OBJECT)

A list of virtual-easy-handler functions to be called for this virtual host.

SETFVIRTUAL-HOST-EASY-HANDLER-ALIST (NEW-VALUE OBJECT)

A list of virtual-easy-handler functions to be called for this virtual host.

VIRTUAL-HOST-HANDLED-HOST-LIST (OBJECT)

A list of the hostnames which for which this virtual host handles the requests if a suffix of the host of the request matches one of the names in this list.

SETFVIRTUAL-HOST-HANDLED-HOST-LIST (NEW-VALUE OBJECT)

A list of the hostnames which for which this virtual host handles the requests if a suffix of the host of the request matches one of the names in this list.

VIRTUAL-HOST-NAME (OBJECT)

The name of the virtual host

SETFVIRTUAL-HOST-NAME (NEW-VALUE OBJECT)

The name of the virtual host

VIRTUAL-HOST-SERVER (OBJECT)

The hunchentoot::server for which this virtual-host should be used. If nil, use this virtual host for all servers.

SETFVIRTUAL-HOST-SERVER (NEW-VALUE OBJECT)

The hunchentoot::server for which this virtual-host should be used. If nil, use this virtual host for all servers.

VARIABLE

Private

*SERVER-VHOST-LIST-HASH-TABLE*

A hash-table that stores whose keys are hunchentoot:server objects and whose values are a list of virtual hosts associated with the given hunchentoot:server object. To associate a hunchentoot-vhost object with a given server one either provides the server as a &key :server argument to make-virtual-host or calls add-virtual-host to add the hunchentoot-vhost to the given server.

Undocumented

*VIRTUAL-HOST*

CLASS

Public

VIRTUAL-HOST

An object of this class contains information about a virtual host to be handled by the hunchentoot-vhost machinery.