The org.melusina.webmachine Reference Manual

This is the org.melusina.webmachine Reference Manual, generated automatically by Declt version 4.0 beta 2 "William Riker" on Mon Feb 26 15:52:37 2024 GMT+0.

Table of Contents


1 Introduction


2 Systems

The main system appears first, followed by any subsystem dependency.


2.1 org.melusina.webmachine

HTTP Semantic Awareness on top of Hunchentoot

Author

Michaël Le Barbier

License

MIT License

Dependencies
  • alexandria (system).
  • cl-ppcre (system).
  • hunchentoot (system).
  • parse-number (system).
  • trivia (system).
Source

org.melusina.webmachine.asd.

Child Component

src (module).


3 Modules

Modules are listed depth-first from the system components tree.


3.1 org.melusina.webmachine/src

Source

org.melusina.webmachine.asd.

Parent Component

org.melusina.webmachine (system).

Child Components

4 Files

Files are sorted by type and then listed depth-first from the systems components trees.


4.1 Lisp


4.1.1 org.melusina.webmachine/org.melusina.webmachine.asd

Source

org.melusina.webmachine.asd.

Parent Component

org.melusina.webmachine (system).

ASDF Systems

org.melusina.webmachine.


4.1.2 org.melusina.webmachine/src/package.lisp

Source

org.melusina.webmachine.asd.

Parent Component

src (module).

Packages

org.melusina.webmachine.


4.1.3 org.melusina.webmachine/src/utilities.lisp

Source

org.melusina.webmachine.asd.

Parent Component

src (module).

Internals

4.1.4 org.melusina.webmachine/src/configuration.lisp

Source

org.melusina.webmachine.asd.

Parent Component

src (module).

Public Interface

*catch-errors* (special variable).


4.1.5 org.melusina.webmachine/src/condition.lisp

Source

org.melusina.webmachine.asd.

Parent Component

src (module).

Public Interface
Internals

status-code-short-description (function).


4.1.6 org.melusina.webmachine/src/content.lisp

Source

org.melusina.webmachine.asd.

Parent Component

src (module).

Public Interface

4.1.7 org.melusina.webmachine/src/request.lisp

Source

org.melusina.webmachine.asd.

Parent Component

src (module).

Public Interface
Internals

parameter-value (function).


4.1.8 org.melusina.webmachine/src/reply.lisp

Source

org.melusina.webmachine.asd.

Parent Component

src (module).

Public Interface

4.1.9 org.melusina.webmachine/src/request-method.lisp

Source

org.melusina.webmachine.asd.

Parent Component

src (module).

Public Interface
Internals

4.1.10 org.melusina.webmachine/src/media-type.lisp

Source

org.melusina.webmachine.asd.

Parent Component

src (module).

Public Interface
Internals

*media-type-repository* (special variable).


4.1.11 org.melusina.webmachine/src/path.lisp

Source

org.melusina.webmachine.asd.

Parent Component

src (module).

Public Interface

path-parameters (function).

Internals

4.1.12 org.melusina.webmachine/src/resource.lisp

Source

org.melusina.webmachine.asd.

Parent Component

src (module).

Public Interface
Internals

4.1.14 org.melusina.webmachine/src/directory-resource.lisp

Source

org.melusina.webmachine.asd.

Parent Component

src (module).

Public Interface

4.1.15 org.melusina.webmachine/src/file-resource.lisp

Source

org.melusina.webmachine.asd.

Parent Component

src (module).

Public Interface

4.1.16 org.melusina.webmachine/src/acceptor.lisp

Source

org.melusina.webmachine.asd.

Parent Component

src (module).

Public Interface
Internals

acceptor-server-name (method).


5 Packages

Packages are listed by definition order.


5.1 org.melusina.webmachine

Source

package.lisp.

Use List

common-lisp.

Public Interface
Internals

6 Definitions

Definitions are sorted by export status, category, package, and then by lexicographic order.


6.1 Public Interface


6.1.1 Special variables

Special Variable: *catch-errors*

If non-NIL, catch any error and explain them to the client.

If T (the default), *any* erroneous conditions that are a *fault of
the server and not of the user-agent*, including errors *and* HTTP 500-class conditions voluntarily signalled by the program logic, will
still result in a response to the user-agent.

To compose this response, Webmachine will first try EXPLAIN-CONDITION to “politely” explain the condition in a format accepted by the user-agent, as indicated in the :ACCEPT header. If that fails, the error is presented very succintly to the client.

If set to NIL, errors will bubble up out of Webmachine and possible land you in the debugger. This option is also useful during development if you prefer an interactive debugger

Package

org.melusina.webmachine.

Source

configuration.lisp.


6.1.2 Macros

Macro: define-constant-resource ((name &key uri content-type) &body body)

Define a constant resource.

Package

org.melusina.webmachine.

Source

constant-resource.lisp.

Macro: define-media-type (identifier &rest initargs &key reply-class description)

Define a media-type with the given NAME and ARGS.

Package

org.melusina.webmachine.

Source

media-type.lisp.

Macro: define-request-method (identifier &rest initargs &key request-class destructive-p description)

Define a request-method with the given IDENTIFIER and ARGS.

Package

org.melusina.webmachine.

Source

request-method.lisp.

Macro: with-content-output-to-sequence ((var &key external-format encoding) &body body)

Create an in-memory content output stream for reply content and bind VAR to it in BODY. The return value of this macro is a vector containing the octets resulting from writing to VAR within BODY.

Package

org.melusina.webmachine.

Source

content.lisp.

Macro: with-path-parameters (parameters request &body body)

Run BODY in an environment where PARAMETERS are bound to REQUEST.
The PARAMETERS are either a Symbol, which then associated to a parameter of the same name, or a list with two elements, a Symbol and a parameter name.

Package

org.melusina.webmachine.

Source

request.lisp.


6.1.3 Ordinary functions

Function: describe-media-types ()

A text holding the description of every known media type.

Package

org.melusina.webmachine.

Source

media-type.lisp.

Function: describe-request-methods ()

A text holding the description of every known request method.

Package

org.melusina.webmachine.

Source

request-method.lisp.

Function: find-media-type (designator)

Find a media-type whose name matches DESIGNATOR.
When a media type corresponding to DESIGNATOR is found, this request method is returned, otherwise NIL is returned. The DESIGNATOR can be a string, a keyword, a request-method, or a symbol.

Package

org.melusina.webmachine.

Source

media-type.lisp.

Function: find-request-method (designator)

Find a request-method whose identifier matches DESIGNATOR.
When a request method corresponding to DESIGNATOR is found, this request method is returned, otherwise NIL is returned. The DESIGNATOR can be a string, a keyword, a request-method, or a symbol.

Package

org.melusina.webmachine.

Source

request-method.lisp.

Function: find-resource (designator)

Find a resource whose name matches DESIGNATOR.
The DESIGNATOR can be a string, a keyword, a resource, or a symbol.

Package

org.melusina.webmachine.

Source

resource.lisp.

Function: http-condition-short-description (http-condition)

The short description of HTTP-CONDITION.

Package

org.melusina.webmachine.

Source

condition.lisp.

Function: http-error (&optional status-code short-description &rest arguments)

Signal a HTTP-ERROR with the given STATUS-CODE and SHORT-DESCRIPTION.

Package

org.melusina.webmachine.

Source

condition.lisp.

Function: list-media-types ()

A list of designators of all media types known to the system.

Package

org.melusina.webmachine.

Source

media-type.lisp.

Function: list-request-methods ()

A list of designators of all request-methods known to the system.

Package

org.melusina.webmachine.

Source

request-method.lisp.

Function: make-acceptor (&rest initargs &key resources server-name message-log-destination access-log-destination listen-backlog write-timeout read-timeout persistent-conntections-p input-chunking-p output-chunking-p taskmaster reply-class request class name address port)

Make a Webmachine acceptor.

Package

org.melusina.webmachine.

Source

acceptor.lisp.

Function: make-constant-resource (&rest initargs &key path name available-p uri-too-long-p payload-too-large-p allowed-methods known-methods valid-request-p authorized-p forbidden-p valid-content-headers-p valid-content-type-p options content-types-provided languages-provided charsets-provided encodings-provided flexible-negotiation-p response)

Make a CONSTANT-RESOURCE with provided details.

Package

org.melusina.webmachine.

Source

constant-resource.lisp.

Function: make-content-output-stream (raw-output-stream &key external-format encoding)

Make a content output stream writing to the underlying RAW-OUTPUT-STREAM. The final output stream takes care of writing characters using the specified EXTERNAL-FORMAT and of applying the given ENCODING.

Accepted values for EXTERNAL-FORMAT are external format designators as recognised by the flexi-streams library. Accepted values for the ENCODING parameter are

:IDENTITY :GZIP :DEFLATE and :COMPRESS

Package

org.melusina.webmachine.

Source

content.lisp.

Function: make-directory-resource (&rest initargs &key path name alias)

Make a DIRECTORY-RESOURCE with provided details.

Package

org.melusina.webmachine.

Source

directory-resource.lisp.

Function: make-file-resource (&rest initargs &key path name alias)

Make a FILE-RESOURCE with provided details.

Package

org.melusina.webmachine.

Source

file-resource.lisp.

Function: make-media-type (&rest initargs &key identifier name reply-class description)

Make a media-type with the given NAME and ARGS.

Package

org.melusina.webmachine.

Source

media-type.lisp.

Function: make-request-method (&rest initargs &key identifier request-class destructive-p description)

Make a request-method with the given IDENTIFIER and ARGS.

Package

org.melusina.webmachine.

Source

request-method.lisp.

Function: media-type-p (thing)

Predicate recognising media types.

Package

org.melusina.webmachine.

Source

media-type.lisp.

Function: path-parameters (path)

The list of keyword parameters bound in a PATH.

Package

org.melusina.webmachine.

Source

path.lisp.

Function: remove-media-type (designator)

Remove media type from the repository of known media types. Return T if there was such an entry, or NIL if not.

Package

org.melusina.webmachine.

Source

media-type.lisp.

Function: remove-request-method (designator)

Remove request method from the repository of known request methods. Return T if there was such an entry, or NIL if not.

Package

org.melusina.webmachine.

Source

request-method.lisp.

Function: remove-resource (designator)

Remove a resource from resource repository.

Package

org.melusina.webmachine.

Source

resource.lisp.

Function: request-method-name (instance)

The name of a request method.

Package

org.melusina.webmachine.

Source

request-method.lisp.

Function: request-method-p (thing)

Predicate recognising request-methods.

Package

org.melusina.webmachine.

Source

request-method.lisp.

Function: resource (name)

The resource named NAME.

Package

org.melusina.webmachine.

Source

resource.lisp.

Function: (setf resource) (name)
Package

org.melusina.webmachine.

Source

resource.lisp.

Function: resource-p (object)

Predicate recognising resources.

Package

org.melusina.webmachine.

Source

resource.lisp.

Function: resources ()
Package

org.melusina.webmachine.

Source

resource.lisp.

Function: (setf resources) ()
Package

org.melusina.webmachine.

Source

resource.lisp.


6.1.4 Generic functions

Generic Reader: http-condition-status-code (condition)
Package

org.melusina.webmachine.

Methods
Reader Method: http-condition-status-code ((condition http-condition))
Source

condition.lisp.

Target Slot

status-code.

Generic Reader: media-type-description (object)
Package

org.melusina.webmachine.

Methods
Reader Method: media-type-description ((media-type media-type))

A description of the media-type. If present, this description can be inserted in automatically generated documents.

Source

media-type.lisp.

Target Slot

description.

Generic Reader: media-type-name (object)
Package

org.melusina.webmachine.

Methods
Reader Method: media-type-name ((media-type media-type))

A string representing the MEDIA-TYPE.

Source

media-type.lisp.

Target Slot

name.

Generic Reader: reply-media-type (object)
Package

org.melusina.webmachine.

Methods
Reader Method: reply-media-type ((reply reply))

automatically generated reader method

Source

reply.lisp.

Target Slot

media-type.

Generic Function: resource-allowed-methods (resource)

The list of allowed methods on a resource.
A request to this resource whose method is not included in the returned list will result in a 405 Method Not Allowed. The response will include an :ALLOW header that lists the allowed methods. (V3B10)

The HyperText Transfer Protocol (HTTP) 405 Method Not Allowed response status code indicates that the request method is known by the server but is not supported by the target resource.

The server MUST generate an Allow header field in a 405 response containing a list of the target resource’s currently supported methods.

The method combination for this generic function is the standard one. Generic resources allow :GET and :HEAD resources.

Package

org.melusina.webmachine.

Source

resource.lisp.

Methods
Method: resource-allowed-methods ((resource file-resource))
Source

file-resource.lisp.

Method: resource-allowed-methods ((resource directory-resource))
Source

directory-resource.lisp.

Method: resource-allowed-methods ((resource constant-resource))
Source

constant-resource.lisp.

Method: resource-allowed-methods (resource)
Generic Function: resource-authorized-p (resource request)

This predicate recognises if a request is authorized.
When a request is unauthorized, the resource answers that request with a 401 Unauthorized. (V3B8)

The HTTP 401 Unauthorized client error status response code indicates that the request has not been applied because it lacks valid authentication credentials for the target resource.

This status is sent with a WWW-Authenticate header that contains information on how to authorize correctly.

This status is similar to 403, but in this case, authentication is possible.

Generic resources accept all requests.

Package

org.melusina.webmachine.

Source

resource.lisp.

Methods
Method: resource-authorized-p ((resource constant-resource) request)
Source

constant-resource.lisp.

Method: resource-authorized-p (resource request)
Generic Function: resource-available-p (resource)

This predicate recognises if a resource is available.
When a resource is not available, requests it handles are answered with a 503 Service Unavailable status code. (V3B13)

The method combination for this generic function is AND, so that compound resources are unavailable if a participating resource is unavailable.

Generic resources are always available.

Package

org.melusina.webmachine.

Source

resource.lisp.

Method Combination

and.

Options

:most-specific-first

Methods
Method: resource-available-p and ((resource constant-resource))
Source

constant-resource.lisp.

Method: resource-available-p and (resource)
Generic Function: resource-charsets-provided (resource request)

Content negociation for accepted charsets.
This should return a list of charsets or external formats designators. Content negotiation is driven by this return value. For example, if a client request includes an :ACCEPT-CHARSET header with a value that does not appear as a first element in any of the return tuples, then a 406 Not Acceptable will be sent.

Default: (:utf-8)

Package

org.melusina.webmachine.

Source

resource.lisp.

Methods
Method: resource-charsets-provided ((resource constant-resource) request)
Source

constant-resource.lisp.

Method: resource-charsets-provided (resource request)
Generic Function: resource-content-types-provided (resource request)

Content negociation for accepted content types.

This should return a list of accepted media types designators. Content negotiation is driven by this return value.

For example, if a client request includes an :ACCEPT header with a value that does not appear in the list of content types provided, then a 406 Not Acceptable will be sent.

When a second value is supplied, this value is used as the result of a failed negotiation instead of returning 406.

Package

org.melusina.webmachine.

Source

resource.lisp.

Methods
Method: resource-content-types-provided ((resource file-resource) request)
Source

file-resource.lisp.

Method: resource-content-types-provided ((resource directory-resource) request)
Source

directory-resource.lisp.

Method: resource-content-types-provided ((resource constant-resource) request)
Source

constant-resource.lisp.

Method: resource-content-types-provided (resource request)
Generic Function: resource-encodings-provided (resource request)

Content negociation for accepted encodings.
This should return a list of encoding designators. Content negotiation is driven by this return value. For example, if a client request includes an :ACCEPT-ENCODING header with a value that does not appear as a first element in any of the return tuples, then a 406 Not Acceptable will be sent.

Default: (:identity)

Package

org.melusina.webmachine.

Source

resource.lisp.

Methods
Method: resource-encodings-provided ((resource constant-resource) request)
Source

constant-resource.lisp.

Method: resource-encodings-provided (resource request)
Generic Function: resource-exists-p (resource request)

This predicate recognises if a resource exists.
When a resource does not exist, requests it handles are answered with a 404 Not found status code, in most cases. (V3G7)

The method combination for this generic function is AND, so that compound resources only exists if every participating resource exist.

Generic resources always exist.

Package

org.melusina.webmachine.

Source

resource.lisp.

Method Combination

and.

Options

:most-specific-first

Methods
Method: resource-exists-p and ((resource file-resource) request)
Source

file-resource.lisp.

Method: resource-exists-p and ((resource directory-resource) request)
Source

directory-resource.lisp.

Method: resource-exists-p and (resource request)
Generic Function: resource-flexible-negotiation-p (resource request)

Predicate recognising flexible negotiation situations.
When a flexible negotiation situation is recognised, the Webmachine chooses to requalify client’s preferences instead to avoid returning a 406 Not Acceptable status code. Instead it uses the first option provided as if it were accpetable by the client.

Package

org.melusina.webmachine.

Source

resource.lisp.

Methods
Method: resource-flexible-negotiation-p ((resource file-resource) request)
Source

file-resource.lisp.

Method: resource-flexible-negotiation-p ((resource directory-resource) request)
Source

directory-resource.lisp.

Method: resource-flexible-negotiation-p ((resource constant-resource) request)
Source

constant-resource.lisp.

Method: resource-flexible-negotiation-p (resource request)
Generic Function: resource-forbidden-p (resource request)

This predicate recognises if a request tries to access a forbidden resource. When access to a resource is forbidden, the resource answers that request with a 403 Forbidden. (V3B7)

The HTTP 403 Forbidden client error status response code indicates that the server understood the request but refuses to authorize it.

This status is similar to 401, but in this case, re-authenticating will make no difference. The access is permanently forbidden and tied to the application logic, such as insufficient rights to a resource.

The method combination for this generic function is OR, so that an access is forbidden for a compound resource if a participating resource considers the access is forbidden.

Generic resources consider no access to be forbidden.

Package

org.melusina.webmachine.

Source

resource.lisp.

Method Combination

or.

Options

:most-specific-first

Methods
Method: resource-forbidden-p or ((resource file-resource) request)
Source

file-resource.lisp.

Method: resource-forbidden-p or ((resource directory-resource) request)
Source

directory-resource.lisp.

Method: resource-forbidden-p or ((resource constant-resource) request)
Source

constant-resource.lisp.

Method: resource-forbidden-p or (resource request)
Generic Function: resource-handle-request-p (resource request)

This predicate recognises if RESOURCE wants to handle REQUEST.

Package

org.melusina.webmachine.

Source

resource.lisp.

Methods
Method: resource-handle-request-p ((instance file-resource) request)
Source

file-resource.lisp.

Method: resource-handle-request-p ((instance directory-resource) request)
Source

directory-resource.lisp.

Method: resource-handle-request-p ((instance resource) request)
Generic Function: resource-known-methods (resource)

The list of HTTP methods supported by the resource.
When a resource does not support the HTTP method of a request, that request is answered with a 501 Not Implemented status code. (V3B12)

The HyperText Transfer Protocol (HTTP) 501 Not Implemented server error response code indicates that the server does not support the functionality required to fulfill the request. This is the appropriate response when the server does not recognize the request method and is not capable of supporting it for any resource. The only request methods that servers are required to support (and therefore that must not return this code) are :GET and :HEAD.

The method combination for this generic function is APPEND, so that compound resources support all methods supported by participating resources.

The default value presents the de facto standard list of HTTP methods but could be extendend to implement HTTP extensions. The actual list is:

:GET :HEAD :POST :PUT :DELETE :TRACE :CONNECT and :OPTIONS

This must not be confused with the ‘resource-allowed-methods’ method.

Package

org.melusina.webmachine.

Source

resource.lisp.

Method Combination

append.

Options

:most-specific-first

Methods
Method: resource-known-methods append ((resource constant-resource))
Source

constant-resource.lisp.

Method: resource-known-methods append (resource)
Generic Function: resource-languages-provided (resource request)

Content negociation for accepted languages.
This should return or list of languages, where each language is identified by a string.

When a request has invalid accept language headers, the resource answers that request with a 406 Not Acceptable. (V3D5)

Package

org.melusina.webmachine.

Source

resource.lisp.

Methods
Method: resource-languages-provided ((resource constant-resource) request)
Source

constant-resource.lisp.

Method: resource-languages-provided (resource request)
Generic Reader: resource-name (object)
Package

org.melusina.webmachine.

Methods
Reader Method: resource-name ((resource resource))

The NAME of the resource.
This NAME is used in logging artefacts and introspective presentations, to ease maintenance of the program.

Source

resource.lisp.

Target Slot

name.

Generic Function: resource-options (resource request)

Headers to put in the answer of an :OPTIONS request.
If the OPTIONS method is supported and is used, the return value of this function is expected to be an alist of pairs representing header names and values that should appear in the response.

The method combination for this generic function is APPEND, so that compound resources support all methods supported by participating resources. When several values for the same header are provided, only the header value defined by the most specialised class is used.

Package

org.melusina.webmachine.

Source

resource.lisp.

Method Combination

append.

Options

:most-specific-first

Methods
Method: resource-options append ((resource constant-resource) request)
Source

constant-resource.lisp.

Method: resource-options append (resource request)
Generic Reader: resource-path (object)
Package

org.melusina.webmachine.

Methods
Reader Method: resource-path ((resource resource))

The URI PATH where the resource is located.
The PATH is a list of strings and keyword. A string matches itself in the URI PATH and a keyword matches a non-empty string made of characters in the range [A-Za-z0-9_-] whose value shoud be bound to the parameter denoted by the keyword.

Source

resource.lisp.

Target Slot

path.

Generic Function: resource-payload-too-large-p (resource request)

This predicate recognises if a request entity is too large.
When a request entity is too large, the resource answers that request with a 413 Payload Too Large. (V3B4)

The HTTP 413 Payload Too Large response status code indicates that the request entity is larger than limits defined by server; the server might close the connection or return a Retry-After header field.

Package

org.melusina.webmachine.

Source

resource.lisp.

Methods
Method: resource-payload-too-large-p ((resource constant-resource) request)
Source

constant-resource.lisp.

Method: resource-payload-too-large-p (resource request)
Generic Function: resource-uri-too-long-p (resource request)

This predicate recognises if a URI is too long.
When a URI of request is too long, the resource answers that request with a 414 Request-URI Too Long. (V3B11)

The HTTP 414 URI Too Long response status code indicates that the URI requested by the client is longer than the server is willing to interpret.

There are a few rare conditions when this might occur:

- when a client has improperly converted a POST request to a GET request with long query information,

- when the client has descended into a loop of redirection (for example, a redirected URI prefix that points to a suffix of itself),

- or when the server is under attack by a client attempting to exploit potential security holes.

Generic resources accept all URI resources length.

Package

org.melusina.webmachine.

Source

resource.lisp.

Methods
Method: resource-uri-too-long-p ((resource constant-resource) request)
Source

constant-resource.lisp.

Method: resource-uri-too-long-p (resource request)
Generic Function: resource-valid-content-headers-p (resource request)

This predicate recognises if a request bears valid Content-* headers. When a request has invalid content headers, the resource answers that request with a 501 Not Implemented. (V3B6)

The HTTP 501 Not Implemented server error response code indicates that the server does not support the functionality required to fulfill the request. This is the appropriate response when the server does not recognize the request method and is not capable of supporting it for any resource. The only request methods that servers are required to support (and therefore that must not return this code) are :GET and :HEAD.

The method combination for this generic function is AND, so that a request has valid content headers for a compound resource if all participating resources consider the request to have valid content headers.

Generic resources accept all requests.

Package

org.melusina.webmachine.

Source

resource.lisp.

Method Combination

and.

Options

:most-specific-first

Methods
Method: resource-valid-content-headers-p and ((resource constant-resource) request)
Source

constant-resource.lisp.

Method: resource-valid-content-headers-p and (resource request)
Generic Function: resource-valid-content-type-p (resource request)

This predicate recognises if a request bears valid content type. When a request has invalid content type, the resource answers that request with a 415 Unsupported Media Type. (V3B5)

The HTTP 415 Unsupported Media Type client error response code indicates that the server refuses to accept the request because the payload format is in an unsupported format.

The format problem might be due to the request’s indicated Content-Type or Content-Encoding, or as a result of inspecting the data directly.

The method combination for this generic function is AND, so that
a request has valid content type for a compound resource if
all participating resources consider the request to have valid content type.

Generic resources accept all requests.

Package

org.melusina.webmachine.

Source

resource.lisp.

Method Combination

and.

Options

:most-specific-first

Methods
Method: resource-valid-content-type-p and ((resource constant-resource) request)
Source

constant-resource.lisp.

Method: resource-valid-content-type-p and (resource request)
Generic Function: resource-valid-request-p (resource request)

This predicate recognises if a request is valid.
When a request is invalid, the resource answers that request with a 400 Bad Request. (V3B9)

The HyperText Transfer Protocol (HTTP) 400 Bad Request response status code indicates that the server cannot or will not process the request due to something that is perceived to be a client error (e.g., malformed request syntax, invalid request message framing, or deceptive request routing).

The method combination for this generic function is AND, so that a request is valid for a compound resource if all participating resources consider the request valid.

Generic resources accept all requests.

Package

org.melusina.webmachine.

Source

resource.lisp.

Method Combination

and.

Options

:most-specific-first

Methods
Method: resource-valid-request-p and ((resource directory-resource) request)
Source

directory-resource.lisp.

Method: resource-valid-request-p and ((resource constant-resource) request)
Source

constant-resource.lisp.

Method: resource-valid-request-p and (resource request)
Generic Function: write-resource-response (resource request reply response-body)

Write the RESOURCE response for REQUEST to RESPONSE-BODY.
The response must be represented as specificed by the content type of the REPLY.

When this method returns a STRING, the string is used as a response and written to RESPONSE-BODY by Webmachine.

Package

org.melusina.webmachine.

Source

resource.lisp.

Methods
Method: write-resource-response ((resource file-resource) (request get-request) (reply reply) response-body)
Source

file-resource.lisp.

Method: write-resource-response ((resource directory-resource) (request get-request) (reply reply) response-body)
Source

directory-resource.lisp.

Method: write-resource-response ((resource constant-resource) (request get-request) (reply reply) response-body)
Source

constant-resource.lisp.

Method: write-resource-response (resource request reply response-body)

6.1.5 Standalone methods

Method: acceptor-dispatch-request ((instance acceptor) request)

The “Webmachine” dispatcher selects service to handle a request.

Package

hunchentoot.

Source

acceptor.lisp.

Method: describe-object ((instance acceptor) stream)
Source

acceptor.lisp.

Method: initialize-instance :after ((instance resource) &rest initargs &key &allow-other-keys)
Source

resource.lisp.

Method: initialize-instance :after ((instance constant-resource) &rest initargs &key &allow-other-keys)
Source

constant-resource.lisp.

Method: initialize-instance :after ((instance media-type) &rest initargs &key &allow-other-keys)
Source

media-type.lisp.

Method: initialize-instance :after ((instance directory-resource) &rest initargs &key &allow-other-keys)
Source

directory-resource.lisp.

Method: initialize-instance :after ((instance request-method) &rest initargs &key &allow-other-keys)
Source

request-method.lisp.

Method: initialize-instance :after ((instance file-resource) &rest initargs &key &allow-other-keys)
Source

file-resource.lisp.

Method: print-object ((object resource) stream)
Source

resource.lisp.

Method: print-object ((object media-type) stream)
Source

media-type.lisp.

Method: print-object ((object directory-resource) stream)
Source

directory-resource.lisp.

Method: print-object ((object http-condition) stream)
Source

condition.lisp.

Method: print-object ((object request-method) stream)
Source

request-method.lisp.

Method: print-object ((object file-resource) stream)
Source

file-resource.lisp.


6.1.6 Conditions

Condition: http-condition

A HTTP-CONDITION is signalled upon protocol errors.
A protocol error is transmitted to the client and the server can continue normal operation.

Package

org.melusina.webmachine.

Source

condition.lisp.

Direct superclasses

simple-condition.

Direct subclasses

http-error.

Direct methods
Direct Default Initargs
InitargValue
:format-controlhttp condition
Direct slots
Slot: status-code
Initform

(quote (error "a http-condition reqiures a status code."))

Initargs

:status-code

Readers

http-condition-status-code.

Writers

This slot is read-only.

Condition: http-error

A HTTP-ERROR is signalled upon processing errors.
It indicates to the client that the server encountered an unexpected condition that prevented it from fulfilling the request.

Package

org.melusina.webmachine.

Source

condition.lisp.

Direct superclasses
Direct Default Initargs
InitargValue
:format-controlinternal server error
:status-code500

6.1.7 Classes

Class: acceptor

This is the acceptor of the Webmachine framework.

Package

org.melusina.webmachine.

Source

acceptor.lisp.

Direct superclasses

acceptor.

Direct subclasses

ssl-acceptor.

Direct methods
Direct Default Initargs
InitargValue
:request-class(quote request)
:reply-class(quote reply)
:document-rootnil
:server-namewebmachine
:resourcesnil
:error-template-directorynil
Direct slots
Slot: resources

The RESOURCES served by the server.

Initargs

:resources

Slot: server-name

The server name to return in Server headers.

Initargs

:server-name

Class: application-reply

The REPLY subclass for content of general type.

Package

org.melusina.webmachine.

Source

reply.lisp.

Direct superclasses

reply.

Direct subclasses
Direct slots
Slot: media-type
Allocation

:class

Initform

:application

Class: application/json-reply

The REPLY subclass for application/json content.

Package

org.melusina.webmachine.

Source

reply.lisp.

Direct superclasses

application-reply.

Direct slots
Slot: media-type
Allocation

:class

Initform

:application/json

Class: application/octet-stream-reply

The REPLY subclass for application/octet-stream content.

Package

org.melusina.webmachine.

Source

reply.lisp.

Direct superclasses

application-reply.

Direct slots
Slot: media-type
Allocation

:class

Initform

:application/octet-stream

Class: audio-reply

The REPLY subclass for audio content.

Package

org.melusina.webmachine.

Source

reply.lisp.

Direct superclasses

reply.

Direct slots
Slot: media-type
Allocation

:class

Initform

:audio

Class: connect-request

The CONNECT method establishes a tunnel to the server identified by the target resource.
WWW: https://developer.mozilla.org/en-US/docs/Web/HTTP/Methods/CONNECT

Package

org.melusina.webmachine.

Source

request.lisp.

Direct superclasses

request.

Class: constant-resource

A resource on which generic functions return a fixed value, corresponding to initialisation parameters of the instance. Such a resource is useful for testing.

Package

org.melusina.webmachine.

Source

constant-resource.lisp.

Direct superclasses

resource.

Direct methods
Direct Default Initargs
InitargValue
:available-pt
:uri-too-long-pnil
:payload-too-large-pnil
:allowed-methods(quote (get head))
:known-methods(quote (get head post put delete connect options trace patch))
:valid-request-pt
:authorized-pt
:forbidden-pnil
:valid-content-headers-pt
:valid-content-type-pt
:optionst
:content-types-provided(quote (text/plain))
:languages-provided(quote (en-us))
:charsets-provided(quote (utf-8))
:encodings-provided(quote (identity))
:flexible-negotiation-pnil
:response(quote ((text/plain . a constant resource.)))
Direct slots
Slot: available-p

The return value of the ‘RESOURCE-AVAILABLE-P’ generic function.

Initargs

:available-p

Slot: known-methods

The return value of the ‘RESOURCE-KNOWN-METHODS’ generic function.

Initargs

:known-methods

Slot: uri-too-long-p

The return value of the ‘RESOURCE-URI-TOO-LONG-P’ generic function.

Initargs

:uri-too-long-p

Slot: payload-too-large-p

The return value of the ‘RESOURCE-PAYLOAD-TOO-LARGE-P’ generic function.

Initargs

:payload-too-large-p

Slot: allowed-methods

The return value of the ‘RESOURCE-ALLOWED-METHODS’ generic function.

Initargs

:allowed-methods

Slot: valid-request-p

The return value of the ‘RESOURCE-VALID-REQUEST-P’ generic function.

Initargs

:valid-request-p

Slot: authorized-p

The return value of the ‘RESOURCE-AUTHORIZED-P’ generic function.

Initargs

:authorized-p

Slot: forbidden-p

The return value of the ‘RESOURCE-FORBIDDEN-P’ generic function.

Initargs

:forbidden-p

Slot: valid-content-headers-p

The return value of the ‘RESOURCE-VALID-CONTENT-HEADERS-P’ generic function.

Initargs

:valid-content-headers-p

Slot: valid-content-type-p

The return value of the ‘RESOURCE-VALID-CONTENT-TYPE-P’ generic function.

Initargs

:valid-content-type-p

Slot: options

The return value of the ‘RESOURCE-OPTIONS’ generic function.

Initform

t

Initargs

:options

Slot: content-types-provided

The return value of the ‘RESOURCE-CONTENT-TYPES-PROVIDED’ generic function.

Initform

(quote (:text/html))

Initargs

:content-types-provided

Slot: languages-provided

The return value of the ‘RESOURCE-LANGUAGES-PROVIDED’ generic function.

Initargs

:languages-provided

Slot: charsets-provided

The return value of the ‘RESOURCE-CHARSETS-PROVIDED’ generic function.

Initargs

:charsets-provided

Slot: encodings-provided

The return value of the ‘RESOURCE-ENCODINGS-PROVIDED’ generic function.

Initargs

:encodings-provided

Slot: flexible-negotiation-p

The return value of the ‘RESOURCE-FLEXIBLE-NEGOTIATION-P’ generic function.

Initargs

:flexible-negotiation-p

Slot: response

The response for the constant resources.
The response can be one of the following

- A string, which is sent to the client.
- A function of a stream, which is responsible for writing the response body in the provided stream.
- An alist mapping content-types to strings or functions, with the same convention as above.

Initargs

:response

Class: delete-request

The DELETE method deletes the specified resource.
WWW: https://developer.mozilla.org/en-US/docs/Web/HTTP/Methods/DELETE

Package

org.melusina.webmachine.

Source

request.lisp.

Direct superclasses

request.

Class: directory-resource

A ‘DIRECTORY-RESOURCE’ map any part of the filesystem into the web space. It is similar to Apache’s Alias feature. The content of the directory is only read once after the resource is created.

The request URI is validated using ‘HUNCHENTOOT::PARSE-PATH’ so that it does not contain directory traversals, explicit devices not host fields. When the URI of a request fails to validate, a Bad Request status
is returned.

The served CONTENT-TYPE is inferred from the name of the file requested, based on the CONTENT-TYPE-RULES slot.

Package

org.melusina.webmachine.

Source

directory-resource.lisp.

Direct superclasses

resource.

Direct methods
Direct slots
Slot: alias

The directory owning the files served by the resource. This must be a PATHNAME designating a directory.

Initargs

:alias

Class: file-resource

A ‘FILE-RESOURCE’ map a regular file into the web space.

The request URI is validated using ‘HUNCHENTOOT::PARSE-PATH’ so that it does not contain directory traversals, explicit devices not host fields. When the URI of a request fails to validate, a Bad Request status
is returned.

The served CONTENT-TYPE is inferred from the name of the file requested, based on the CONTENT-TYPE-RULES slot.

Package

org.melusina.webmachine.

Source

file-resource.lisp.

Direct superclasses

resource.

Direct methods
Direct slots
Slot: alias

The PATHNAME to the file served by the resource.

Initargs

:alias

Slot: content-type
Initargs

:content-type

Class: font-reply

The REPLY subclass for font or typeface content.

Package

org.melusina.webmachine.

Source

reply.lisp.

Direct superclasses

reply.

Direct slots
Slot: media-type
Allocation

:class

Initform

:font

Class: get-request

The GET method requests a representation of the specified resource. Requests using GET should only retrieve data.
WWW: https://developer.mozilla.org/en-US/docs/Web/HTTP/Methods/GET

Package

org.melusina.webmachine.

Source

request.lisp.

Direct superclasses

request.

Direct methods
Class: head-request

The HEAD method asks for a response nearly identical to that of a GET request, but without the response body.
WWW: https://developer.mozilla.org/en-US/docs/Web/HTTP/Methods/HEAD

Package

org.melusina.webmachine.

Source

request.lisp.

Direct superclasses

request.

Class: image-reply

The REPLY subclass for image content.

Package

org.melusina.webmachine.

Source

reply.lisp.

Direct superclasses

reply.

Direct subclasses
Direct slots
Slot: media-type
Allocation

:class

Initform

:image

Class: image/jpeg-reply

The REPLY subclass for image/jpeg content.

Package

org.melusina.webmachine.

Source

reply.lisp.

Direct superclasses

image-reply.

Direct slots
Slot: media-type
Allocation

:class

Initform

:image/jpeg

Class: image/png-reply

The REPLY subclass for image/png content.

Package

org.melusina.webmachine.

Source

reply.lisp.

Direct superclasses

image-reply.

Direct slots
Slot: media-type
Allocation

:class

Initform

:image/png

Class: image/svg+xml-reply

The REPLY subclass for image/svg+xml content.

Package

org.melusina.webmachine.

Source

reply.lisp.

Direct superclasses

image-reply.

Direct slots
Slot: media-type
Allocation

:class

Initform

:image/svg+xml

Class: media-type

This represents a MEDIA-TYPE.

Package

org.melusina.webmachine.

Source

media-type.lisp.

Direct methods
Direct slots
Slot: name

A string representing the MEDIA-TYPE.

Initform

(error "no media-type name.")

Initargs

:name

Readers

media-type-name.

Writers

This slot is read-only.

Slot: identifier

A keyword representing the MEDIA-TYPE.

Initform

(error "no media-type identifier.")

Initargs

:identifier

Slot: reply-class

The class to use to subtype replies with this content type.

Initform

(quote org.melusina.webmachine::application)

Initargs

:reply-class

Slot: description

A description of the media-type. If present, this description can be inserted in automatically generated documents.

Initargs

:description

Readers

media-type-description.

Writers

This slot is read-only.

Class: model-reply

The REPLY subclass for 3D model content.

Package

org.melusina.webmachine.

Source

reply.lisp.

Direct superclasses

reply.

Direct slots
Slot: media-type
Allocation

:class

Initform

:model

Class: options-request

The OPTIONS method is used to describe the communication options for the target resource.
WWW: https://developer.mozilla.org/en-US/docs/Web/HTTP/Methods/OPTIONS

Package

org.melusina.webmachine.

Source

request.lisp.

Direct superclasses

request.

Class: patch-request

The PATCH method is used to apply partial modifications to a resource. WWW: https://developer.mozilla.org/en-US/docs/Web/HTTP/Methods/PATCH

Package

org.melusina.webmachine.

Source

request.lisp.

Direct superclasses

request.

Class: post-request

The POST method is used to submit an entity to the specified resource, often causing a change in state or side effects on the server. WWW: https://developer.mozilla.org/en-US/docs/Web/HTTP/Methods/POST

Package

org.melusina.webmachine.

Source

request.lisp.

Direct superclasses

request.

Class: put-request

The PUT method replaces all current representations of the target resource with the request payload.
WWW: https://developer.mozilla.org/en-US/docs/Web/HTTP/Methods/PUT

Package

org.melusina.webmachine.

Source

request.lisp.

Direct superclasses

request.

Class: reply

Objects of this class hold all the information
about an outgoing reply. They are created automatically by Webmachine and can be accessed and modified by the corresponding handler.

Package

org.melusina.webmachine.

Source

reply.lisp.

Direct superclasses

reply.

Direct subclasses
Direct methods
Direct slots
Slot: media-type
Allocation

:class

Initform

:application

Readers

reply-media-type.

Writers

This slot is read-only.

Class: request

Objects of this class hold all the information
about an incoming request. They are created automatically by acceptors and can be accessed by the corresponding handler.

Package

org.melusina.webmachine.

Source

request.lisp.

Direct superclasses

request.

Direct subclasses
Direct slots
Slot: path-parameters

The alist of parameters inferred by the path.

Initargs

:path-parameters

Slot: language

The negotiated language for the request.
When this parameter is non NIL, it it set by the content negotiation and the client expects the returned content to be in that language.

Initargs

:language

Slot: charset

The negotiated charset for the request.
When this parameter is not NIL it is set by the content negotiation and the client expects the returned content to be prepared using this charset.

Initargs

:charset

Slot: encoding

The negotiated encoding for the request.
When this parameter is non NIL, it is set by the content negotiation and the client expects the returned content to be encoded using the corresponding function.

The possible values for this field are:

NIL, :IDENTITY, :GZIP, :DEFLATE, and :COMPRESS.

Initargs

:charset

Class: request-method

This a request method for the HTTP protocol.

Package

org.melusina.webmachine.

Source

request-method.lisp.

Direct methods
Direct slots
Slot: identifier

A string representing the REQUEST-METHOD.

Initform

(error "no request-method identifier.")

Initargs

:identifier

Slot: request-class

The specialized class of requests associated to this method.

Initform

(quote org.melusina.webmachine:request)

Initargs

:request-class

Slot: destructive-p

A flag identifying request-methods associated with destructive operations.

Initform

(error "no request-method destructive-p flag.")

Initargs

:destructive-p

Slot: description

A description of the request-method, this description can be inserted in automatically generated documents.

Initform

"i am too lazy to describe this request-method."

Initargs

:description

Class: resource

Resources with HTTP Protocol semantics.

Package

org.melusina.webmachine.

Source

resource.lisp.

Direct subclasses
Direct methods
Direct slots
Slot: name

The NAME of the resource.
This NAME is used in logging artefacts and introspective presentations, to ease maintenance of the program.

Initform

(error "no resource name.")

Initargs

:name

Readers

resource-name.

Writers

This slot is read-only.

Slot: path

The URI PATH where the resource is located.
The PATH is a list of strings and keyword. A string matches itself in the URI PATH and a keyword matches a non-empty string made of characters in the range [A-Za-z0-9_-] whose value shoud be bound to the parameter denoted by the keyword.

Initargs

:path

Readers

resource-path.

Writers

This slot is read-only.

Class: ssl-acceptor

This is an acceptor that accepts SSL connections.

Package

org.melusina.webmachine.

Source

acceptor.lisp.

Direct superclasses
Class: text-reply

The REPLY subclass for text content.

Package

org.melusina.webmachine.

Source

reply.lisp.

Direct superclasses

reply.

Direct subclasses
Direct slots
Slot: media-type
Allocation

:class

Initform

:text

Class: text/css-reply

The REPLY subclass for text/css content.

Package

org.melusina.webmachine.

Source

reply.lisp.

Direct superclasses

text-reply.

Direct slots
Slot: media-type
Allocation

:class

Initform

:text/css

Class: text/html-reply

The REPLY subclass for text/html content.

Package

org.melusina.webmachine.

Source

reply.lisp.

Direct superclasses

text-reply.

Direct slots
Slot: media-type
Allocation

:class

Initform

:text/html

Class: text/javascript-reply

The REPLY subclass for text/javascript content.

Package

org.melusina.webmachine.

Source

reply.lisp.

Direct superclasses

text-reply.

Direct slots
Slot: media-type
Allocation

:class

Initform

:text/javascript

Class: text/plain-reply

The REPLY subclass for text/plain content.

Package

org.melusina.webmachine.

Source

reply.lisp.

Direct superclasses

text-reply.

Direct slots
Slot: media-type
Allocation

:class

Initform

:text/plain

Class: trace-request

The TRACE method performs a message loop-back test along the path to the target resource.
WWW: https://developer.mozilla.org/en-US/docs/Web/HTTP/Methods/TRACE

Package

org.melusina.webmachine.

Source

request.lisp.

Direct superclasses

request.

Class: video-reply

The REPLY subclass for video content.

Package

org.melusina.webmachine.

Source

reply.lisp.

Direct superclasses

reply.

Direct slots
Slot: media-type
Allocation

:class

Initform

:video


6.2 Internals


6.2.1 Special variables

Special Variable: *file-content-type-rules*
Package

org.melusina.webmachine.

Source

utilities.lisp.

Special Variable: *file-content-type-table*
Package

org.melusina.webmachine.

Source

utilities.lisp.

Special Variable: *media-type-repository*

The table of all media-types.
When a media-type is defined, it is added to this table, using its IDENTIFIER as the key.

Package

org.melusina.webmachine.

Source

media-type.lisp.

Special Variable: *request-method-repository*

A repository for request methods.
When a request-method is defined, it is added to this table, using its identifier–a keyword–as the key.

Package

org.melusina.webmachine.

Source

request-method.lisp.

Special Variable: *request-method-repository-initial-content*
Package

org.melusina.webmachine.

Source

request-method.lisp.

Special Variable: *resource-repository*

The table of all resources.
When a resource is defined, it is added to this table, using the NAME as the key.

Package

org.melusina.webmachine.

Source

resource.lisp.


6.2.2 Ordinary functions

Function: file-content-type (pathname)

Guess content-type for PATHNAME.

Package

org.melusina.webmachine.

Source

utilities.lisp.

Function: match-path (path uri)

Match URI against the PATH pattern.
If the URI matches PATH then T and an alist mapping parameters to the corresponding text are returned as multiple values. In this alist, the character name is used as a key. The key to a star parameter is the keyword :RELATIVE-PATH.

If the URI does not match PATH, then NIL is returned.

Package

org.melusina.webmachine.

Source

path.lisp.

Function: negotiate-accept (accept offer)

Negotiate the :ACCEPT content type.
The ACCEPT parameter is an alist of (MEDIA-TYPE . QUALITY) sorted by decreasing quality. The OFFER parameter is a list of acceptable MEDIA-TYPE values. The result of the negotiation is the MEDIA-TYPE that best matches the ACCEPT parameter, or NIL.

Package

org.melusina.webmachine.

Source

resource.lisp.

Function: negotiate-accept-charset (accept offer)

Negotiate the :ACCEPT-CHARSET charset.
The ACCEPT parameter is an alist of (CHARSET . QUALITY) sorted by decreasing quality. The OFFER parameter is a list of CHARSET. The result of the negotiation is the CHARSET that best matches the ACCEPT parameter, or NIL.

Package

org.melusina.webmachine.

Source

resource.lisp.

Function: negotiate-accept-encoding (accept offer)

Negotiate the :ACCEPT-ENCODING encoding.
The ACCEPT parameter is an alist of (ENCODING . QUALITY) sorted by decreasing quality. The OFFER parameter is a list of ENCODING. The result of the negotiation is the ENCODING that best matches the ACCEPT parameter, or NIL.

Package

org.melusina.webmachine.

Source

resource.lisp.

Function: negotiate-accept-language (accept offer)

Negotiate the :ACCEPT-LANGUAGE language.
The ACCEPT parameter is an alist of (LANGUAGE . QUALITY) sorted by decreasing quality. The OFFER parameter is a list of LANGUAGE designators. The result of the negotiation is a LANGUAGE designator that best matches the ACCEPT parameter, or NIL.

Package

org.melusina.webmachine.

Source

resource.lisp.

Function: parameter-value (name request)

The value associated to NAME in request.
When NAME has no associated value, a status code 400 Bad Request is returned.

Package

org.melusina.webmachine.

Source

request.lisp.

Function: parse-header-accept-* (scanner text)

Parse an :ACCEPT-* header.
The response is an alist of (DESIGNATOR . QUALITY) sorted by decreasing quality. (This is a stable sort.)

Package

org.melusina.webmachine.

Source

resource.lisp.

Function: parse-path (concrete-path)

Parse the CONCRETE-PATH into a list of PATH rules.
A path rule is either

- A STRING, matching itself;
- A KEYWORD, matching a safe string in the URI Path;
- A BOOLEAN, only allowed in the last place, indicating a greedy path.

Example valid concrete paths are

"/"
"/chrome/bootstrap/*"
"/user/:id"
"/user/:id/activity/*"

Note: Safe strings are made of the characters in the range [A-Za-z0-9_-]. Note: It is an error to use :RELATIVE-PATH as a keword in the CONCRETE-PATH.

Package

org.melusina.webmachine.

Source

path.lisp.

Function: path-regex (path)

Map the symbolic PATH to a PPCRE matching corresponding URI paths. Parameters are transformed to registers.

Package

org.melusina.webmachine.

Source

path.lisp.

Function: register-constant-resource (name &key uri content-type)
Package

org.melusina.webmachine.

Source

constant-resource.lisp.

Function: resource-handle-request (resource request reply)

Handle the REQUEST using RESOURCE and sending back the REPLY. This walks down the decision graph of the Webmachine.

Package

org.melusina.webmachine.

Source

resource.lisp.

Function: send-file-contents (pathname response-body &optional buffer-size)

Send file contents of PATHNAME on stream RESPONSE-BODY.

Fail with Status code 500 when the file cannot be read. It assumes that the ability to read the file has been otherwise verified and that the file hence has been removed, which is an application logic error or an environmental error.

Package

org.melusina.webmachine.

Source

utilities.lisp.

Function: status-code-short-description (status-code)

The short description associated with STATUS-CODE.

Package

org.melusina.webmachine.

Source

condition.lisp.

Function: string-match (pattern text)

Predicate recognising TEXT matching a globbing PATTERN.

Package

org.melusina.webmachine.

Source

utilities.lisp.

Function: tokenize (token-spec text &key start end)

Tokenize TEXT according to TOKEN-SPEC.
The TOKEN-SPEC is an alist mapping token class names to a regular expression matching tokens of that class. The tokenization process scans repeatedly the text using the provided regular expressions, and returns a list of pairs whose first element is the token class name and the second element the token text.

Package

org.melusina.webmachine.

Source

path.lisp.


6.2.3 Standalone methods

Method: acceptor-server-name ((instance acceptor))
Package

hunchentoot.

Source

acceptor.lisp.


Appendix A Indexes


A.1 Concepts


A.2 Functions

Jump to:   (  
A   D   F   G   H   I   L   M   N   P   R   S   T   W  
Index Entry  Section

(
(setf resource): Public ordinary functions
(setf resources): Public ordinary functions

A
acceptor-dispatch-request: Public standalone methods
acceptor-server-name: Private standalone methods

D
define-constant-resource: Public macros
define-media-type: Public macros
define-request-method: Public macros
describe-media-types: Public ordinary functions
describe-object: Public standalone methods
describe-request-methods: Public ordinary functions

F
file-content-type: Private ordinary functions
find-media-type: Public ordinary functions
find-request-method: Public ordinary functions
find-resource: Public ordinary functions
Function, (setf resource): Public ordinary functions
Function, (setf resources): Public ordinary functions
Function, describe-media-types: Public ordinary functions
Function, describe-request-methods: Public ordinary functions
Function, file-content-type: Private ordinary functions
Function, find-media-type: Public ordinary functions
Function, find-request-method: Public ordinary functions
Function, find-resource: Public ordinary functions
Function, http-condition-short-description: Public ordinary functions
Function, http-error: Public ordinary functions
Function, list-media-types: Public ordinary functions
Function, list-request-methods: Public ordinary functions
Function, make-acceptor: Public ordinary functions
Function, make-constant-resource: Public ordinary functions
Function, make-content-output-stream: Public ordinary functions
Function, make-directory-resource: Public ordinary functions
Function, make-file-resource: Public ordinary functions
Function, make-media-type: Public ordinary functions
Function, make-request-method: Public ordinary functions
Function, match-path: Private ordinary functions
Function, media-type-p: Public ordinary functions
Function, negotiate-accept: Private ordinary functions
Function, negotiate-accept-charset: Private ordinary functions
Function, negotiate-accept-encoding: Private ordinary functions
Function, negotiate-accept-language: Private ordinary functions
Function, parameter-value: Private ordinary functions
Function, parse-header-accept-*: Private ordinary functions
Function, parse-path: Private ordinary functions
Function, path-parameters: Public ordinary functions
Function, path-regex: Private ordinary functions
Function, register-constant-resource: Private ordinary functions
Function, remove-media-type: Public ordinary functions
Function, remove-request-method: Public ordinary functions
Function, remove-resource: Public ordinary functions
Function, request-method-name: Public ordinary functions
Function, request-method-p: Public ordinary functions
Function, resource: Public ordinary functions
Function, resource-handle-request: Private ordinary functions
Function, resource-p: Public ordinary functions
Function, resources: Public ordinary functions
Function, send-file-contents: Private ordinary functions
Function, status-code-short-description: Private ordinary functions
Function, string-match: Private ordinary functions
Function, tokenize: Private ordinary functions

G
Generic Function, http-condition-status-code: Public generic functions
Generic Function, media-type-description: Public generic functions
Generic Function, media-type-name: Public generic functions
Generic Function, reply-media-type: Public generic functions
Generic Function, resource-allowed-methods: Public generic functions
Generic Function, resource-authorized-p: Public generic functions
Generic Function, resource-available-p: Public generic functions
Generic Function, resource-charsets-provided: Public generic functions
Generic Function, resource-content-types-provided: Public generic functions
Generic Function, resource-encodings-provided: Public generic functions
Generic Function, resource-exists-p: Public generic functions
Generic Function, resource-flexible-negotiation-p: Public generic functions
Generic Function, resource-forbidden-p: Public generic functions
Generic Function, resource-handle-request-p: Public generic functions
Generic Function, resource-known-methods: Public generic functions
Generic Function, resource-languages-provided: Public generic functions
Generic Function, resource-name: Public generic functions
Generic Function, resource-options: Public generic functions
Generic Function, resource-path: Public generic functions
Generic Function, resource-payload-too-large-p: Public generic functions
Generic Function, resource-uri-too-long-p: Public generic functions
Generic Function, resource-valid-content-headers-p: Public generic functions
Generic Function, resource-valid-content-type-p: Public generic functions
Generic Function, resource-valid-request-p: Public generic functions
Generic Function, write-resource-response: Public generic functions

H
http-condition-short-description: Public ordinary functions
http-condition-status-code: Public generic functions
http-condition-status-code: Public generic functions
http-error: Public ordinary functions

I
initialize-instance: Public standalone methods
initialize-instance: Public standalone methods
initialize-instance: Public standalone methods
initialize-instance: Public standalone methods
initialize-instance: Public standalone methods
initialize-instance: Public standalone methods

L
list-media-types: Public ordinary functions
list-request-methods: Public ordinary functions

M
Macro, define-constant-resource: Public macros
Macro, define-media-type: Public macros
Macro, define-request-method: Public macros
Macro, with-content-output-to-sequence: Public macros
Macro, with-path-parameters: Public macros
make-acceptor: Public ordinary functions
make-constant-resource: Public ordinary functions
make-content-output-stream: Public ordinary functions
make-directory-resource: Public ordinary functions
make-file-resource: Public ordinary functions
make-media-type: Public ordinary functions
make-request-method: Public ordinary functions
match-path: Private ordinary functions
media-type-description: Public generic functions
media-type-description: Public generic functions
media-type-name: Public generic functions
media-type-name: Public generic functions
media-type-p: Public ordinary functions
Method, acceptor-dispatch-request: Public standalone methods
Method, acceptor-server-name: Private standalone methods
Method, describe-object: Public standalone methods
Method, http-condition-status-code: Public generic functions
Method, initialize-instance: Public standalone methods
Method, initialize-instance: Public standalone methods
Method, initialize-instance: Public standalone methods
Method, initialize-instance: Public standalone methods
Method, initialize-instance: Public standalone methods
Method, initialize-instance: Public standalone methods
Method, media-type-description: Public generic functions
Method, media-type-name: Public generic functions
Method, print-object: Public standalone methods
Method, print-object: Public standalone methods
Method, print-object: Public standalone methods
Method, print-object: Public standalone methods
Method, print-object: Public standalone methods
Method, print-object: Public standalone methods
Method, reply-media-type: Public generic functions
Method, resource-allowed-methods: Public generic functions
Method, resource-allowed-methods: Public generic functions
Method, resource-allowed-methods: Public generic functions
Method, resource-allowed-methods: Public generic functions
Method, resource-authorized-p: Public generic functions
Method, resource-authorized-p: Public generic functions
Method, resource-available-p: Public generic functions
Method, resource-available-p: Public generic functions
Method, resource-charsets-provided: Public generic functions
Method, resource-charsets-provided: Public generic functions
Method, resource-content-types-provided: Public generic functions
Method, resource-content-types-provided: Public generic functions
Method, resource-content-types-provided: Public generic functions
Method, resource-content-types-provided: Public generic functions
Method, resource-encodings-provided: Public generic functions
Method, resource-encodings-provided: Public generic functions
Method, resource-exists-p: Public generic functions
Method, resource-exists-p: Public generic functions
Method, resource-exists-p: Public generic functions
Method, resource-flexible-negotiation-p: Public generic functions
Method, resource-flexible-negotiation-p: Public generic functions
Method, resource-flexible-negotiation-p: Public generic functions
Method, resource-flexible-negotiation-p: Public generic functions
Method, resource-forbidden-p: Public generic functions
Method, resource-forbidden-p: Public generic functions
Method, resource-forbidden-p: Public generic functions
Method, resource-forbidden-p: Public generic functions
Method, resource-handle-request-p: Public generic functions
Method, resource-handle-request-p: Public generic functions
Method, resource-handle-request-p: Public generic functions
Method, resource-known-methods: Public generic functions
Method, resource-known-methods: Public generic functions
Method, resource-languages-provided: Public generic functions
Method, resource-languages-provided: Public generic functions
Method, resource-name: Public generic functions
Method, resource-options: Public generic functions
Method, resource-options: Public generic functions
Method, resource-path: Public generic functions
Method, resource-payload-too-large-p: Public generic functions
Method, resource-payload-too-large-p: Public generic functions
Method, resource-uri-too-long-p: Public generic functions
Method, resource-uri-too-long-p: Public generic functions
Method, resource-valid-content-headers-p: Public generic functions
Method, resource-valid-content-headers-p: Public generic functions
Method, resource-valid-content-type-p: Public generic functions
Method, resource-valid-content-type-p: Public generic functions
Method, resource-valid-request-p: Public generic functions
Method, resource-valid-request-p: Public generic functions
Method, resource-valid-request-p: Public generic functions
Method, write-resource-response: Public generic functions
Method, write-resource-response: Public generic functions
Method, write-resource-response: Public generic functions
Method, write-resource-response: Public generic functions

N
negotiate-accept: Private ordinary functions
negotiate-accept-charset: Private ordinary functions
negotiate-accept-encoding: Private ordinary functions
negotiate-accept-language: Private ordinary functions

P
parameter-value: Private ordinary functions
parse-header-accept-*: Private ordinary functions
parse-path: Private ordinary functions
path-parameters: Public ordinary functions
path-regex: Private ordinary functions
print-object: Public standalone methods
print-object: Public standalone methods
print-object: Public standalone methods
print-object: Public standalone methods
print-object: Public standalone methods
print-object: Public standalone methods

R
register-constant-resource: Private ordinary functions
remove-media-type: Public ordinary functions
remove-request-method: Public ordinary functions
remove-resource: Public ordinary functions
reply-media-type: Public generic functions
reply-media-type: Public generic functions
request-method-name: Public ordinary functions
request-method-p: Public ordinary functions
resource: Public ordinary functions
resource-allowed-methods: Public generic functions
resource-allowed-methods: Public generic functions
resource-allowed-methods: Public generic functions
resource-allowed-methods: Public generic functions
resource-allowed-methods: Public generic functions
resource-authorized-p: Public generic functions
resource-authorized-p: Public generic functions
resource-authorized-p: Public generic functions
resource-available-p: Public generic functions
resource-available-p: Public generic functions
resource-available-p: Public generic functions
resource-charsets-provided: Public generic functions
resource-charsets-provided: Public generic functions
resource-charsets-provided: Public generic functions
resource-content-types-provided: Public generic functions
resource-content-types-provided: Public generic functions
resource-content-types-provided: Public generic functions
resource-content-types-provided: Public generic functions
resource-content-types-provided: Public generic functions
resource-encodings-provided: Public generic functions
resource-encodings-provided: Public generic functions
resource-encodings-provided: Public generic functions
resource-exists-p: Public generic functions
resource-exists-p: Public generic functions
resource-exists-p: Public generic functions
resource-exists-p: Public generic functions
resource-flexible-negotiation-p: Public generic functions
resource-flexible-negotiation-p: Public generic functions
resource-flexible-negotiation-p: Public generic functions
resource-flexible-negotiation-p: Public generic functions
resource-flexible-negotiation-p: Public generic functions
resource-forbidden-p: Public generic functions
resource-forbidden-p: Public generic functions
resource-forbidden-p: Public generic functions
resource-forbidden-p: Public generic functions
resource-forbidden-p: Public generic functions
resource-handle-request: Private ordinary functions
resource-handle-request-p: Public generic functions
resource-handle-request-p: Public generic functions
resource-handle-request-p: Public generic functions
resource-handle-request-p: Public generic functions
resource-known-methods: Public generic functions
resource-known-methods: Public generic functions
resource-known-methods: Public generic functions
resource-languages-provided: Public generic functions
resource-languages-provided: Public generic functions
resource-languages-provided: Public generic functions
resource-name: Public generic functions
resource-name: Public generic functions
resource-options: Public generic functions
resource-options: Public generic functions
resource-options: Public generic functions
resource-p: Public ordinary functions
resource-path: Public generic functions
resource-path: Public generic functions
resource-payload-too-large-p: Public generic functions
resource-payload-too-large-p: Public generic functions
resource-payload-too-large-p: Public generic functions
resource-uri-too-long-p: Public generic functions
resource-uri-too-long-p: Public generic functions
resource-uri-too-long-p: Public generic functions
resource-valid-content-headers-p: Public generic functions
resource-valid-content-headers-p: Public generic functions
resource-valid-content-headers-p: Public generic functions
resource-valid-content-type-p: Public generic functions
resource-valid-content-type-p: Public generic functions
resource-valid-content-type-p: Public generic functions
resource-valid-request-p: Public generic functions
resource-valid-request-p: Public generic functions
resource-valid-request-p: Public generic functions
resource-valid-request-p: Public generic functions
resources: Public ordinary functions

S
send-file-contents: Private ordinary functions
status-code-short-description: Private ordinary functions
string-match: Private ordinary functions

T
tokenize: Private ordinary functions

W
with-content-output-to-sequence: Public macros
with-path-parameters: Public macros
write-resource-response: Public generic functions
write-resource-response: Public generic functions
write-resource-response: Public generic functions
write-resource-response: Public generic functions
write-resource-response: Public generic functions


A.3 Variables

Jump to:   *  
A   C   D   E   F   I   K   L   M   N   O   P   R   S   U   V  
Index Entry  Section

*
*catch-errors*: Public special variables
*file-content-type-rules*: Private special variables
*file-content-type-table*: Private special variables
*media-type-repository*: Private special variables
*request-method-repository*: Private special variables
*request-method-repository-initial-content*: Private special variables
*resource-repository*: Private special variables

A
alias: Public classes
alias: Public classes
allowed-methods: Public classes
authorized-p: Public classes
available-p: Public classes

C
charset: Public classes
charsets-provided: Public classes
content-type: Public classes
content-types-provided: Public classes

D
description: Public classes
description: Public classes
destructive-p: Public classes

E
encoding: Public classes
encodings-provided: Public classes

F
flexible-negotiation-p: Public classes
forbidden-p: Public classes

I
identifier: Public classes
identifier: Public classes

K
known-methods: Public classes

L
language: Public classes
languages-provided: Public classes

M
media-type: Public classes
media-type: Public classes
media-type: Public classes
media-type: Public classes
media-type: Public classes
media-type: Public classes
media-type: Public classes
media-type: Public classes
media-type: Public classes
media-type: Public classes
media-type: Public classes
media-type: Public classes
media-type: Public classes
media-type: Public classes
media-type: Public classes
media-type: Public classes
media-type: Public classes

N
name: Public classes
name: Public classes

O
options: Public classes

P
path: Public classes
path-parameters: Public classes
payload-too-large-p: Public classes

R
reply-class: Public classes
request-class: Public classes
resources: Public classes
response: Public classes

S
server-name: Public classes
Slot, alias: Public classes
Slot, alias: Public classes
Slot, allowed-methods: Public classes
Slot, authorized-p: Public classes
Slot, available-p: Public classes
Slot, charset: Public classes
Slot, charsets-provided: Public classes
Slot, content-type: Public classes
Slot, content-types-provided: Public classes
Slot, description: Public classes
Slot, description: Public classes
Slot, destructive-p: Public classes
Slot, encoding: Public classes
Slot, encodings-provided: Public classes
Slot, flexible-negotiation-p: Public classes
Slot, forbidden-p: Public classes
Slot, identifier: Public classes
Slot, identifier: Public classes
Slot, known-methods: Public classes
Slot, language: Public classes
Slot, languages-provided: Public classes
Slot, media-type: Public classes
Slot, media-type: Public classes
Slot, media-type: Public classes
Slot, media-type: Public classes
Slot, media-type: Public classes
Slot, media-type: Public classes
Slot, media-type: Public classes
Slot, media-type: Public classes
Slot, media-type: Public classes
Slot, media-type: Public classes
Slot, media-type: Public classes
Slot, media-type: Public classes
Slot, media-type: Public classes
Slot, media-type: Public classes
Slot, media-type: Public classes
Slot, media-type: Public classes
Slot, media-type: Public classes
Slot, name: Public classes
Slot, name: Public classes
Slot, options: Public classes
Slot, path: Public classes
Slot, path-parameters: Public classes
Slot, payload-too-large-p: Public classes
Slot, reply-class: Public classes
Slot, request-class: Public classes
Slot, resources: Public classes
Slot, response: Public classes
Slot, server-name: Public classes
Slot, status-code: Public conditions
Slot, uri-too-long-p: Public classes
Slot, valid-content-headers-p: Public classes
Slot, valid-content-type-p: Public classes
Slot, valid-request-p: Public classes
Special Variable, *catch-errors*: Public special variables
Special Variable, *file-content-type-rules*: Private special variables
Special Variable, *file-content-type-table*: Private special variables
Special Variable, *media-type-repository*: Private special variables
Special Variable, *request-method-repository*: Private special variables
Special Variable, *request-method-repository-initial-content*: Private special variables
Special Variable, *resource-repository*: Private special variables
status-code: Public conditions

U
uri-too-long-p: Public classes

V
valid-content-headers-p: Public classes
valid-content-type-p: Public classes
valid-request-p: Public classes


A.4 Data types

Jump to:   A   C   D   F   G   H   I   M   O   P   R   S   T   U   V  
Index Entry  Section

A
acceptor: Public classes
acceptor.lisp: The org․melusina․webmachine/src/acceptor․lisp file
application-reply: Public classes
application/json-reply: Public classes
application/octet-stream-reply: Public classes
audio-reply: Public classes

C
Class, acceptor: Public classes
Class, application-reply: Public classes
Class, application/json-reply: Public classes
Class, application/octet-stream-reply: Public classes
Class, audio-reply: Public classes
Class, connect-request: Public classes
Class, constant-resource: Public classes
Class, delete-request: Public classes
Class, directory-resource: Public classes
Class, file-resource: Public classes
Class, font-reply: Public classes
Class, get-request: Public classes
Class, head-request: Public classes
Class, image-reply: Public classes
Class, image/jpeg-reply: Public classes
Class, image/png-reply: Public classes
Class, image/svg+xml-reply: Public classes
Class, media-type: Public classes
Class, model-reply: Public classes
Class, options-request: Public classes
Class, patch-request: Public classes
Class, post-request: Public classes
Class, put-request: Public classes
Class, reply: Public classes
Class, request: Public classes
Class, request-method: Public classes
Class, resource: Public classes
Class, ssl-acceptor: Public classes
Class, text-reply: Public classes
Class, text/css-reply: Public classes
Class, text/html-reply: Public classes
Class, text/javascript-reply: Public classes
Class, text/plain-reply: Public classes
Class, trace-request: Public classes
Class, video-reply: Public classes
Condition, http-condition: Public conditions
Condition, http-error: Public conditions
condition.lisp: The org․melusina․webmachine/src/condition․lisp file
configuration.lisp: The org․melusina․webmachine/src/configuration․lisp file
connect-request: Public classes
constant-resource: Public classes
constant-resource.lisp: The org․melusina․webmachine/src/constant-resource․lisp file
content.lisp: The org․melusina․webmachine/src/content․lisp file

D
delete-request: Public classes
directory-resource: Public classes
directory-resource.lisp: The org․melusina․webmachine/src/directory-resource․lisp file

F
File, acceptor.lisp: The org․melusina․webmachine/src/acceptor․lisp file
File, condition.lisp: The org․melusina․webmachine/src/condition․lisp file
File, configuration.lisp: The org․melusina․webmachine/src/configuration․lisp file
File, constant-resource.lisp: The org․melusina․webmachine/src/constant-resource․lisp file
File, content.lisp: The org․melusina․webmachine/src/content․lisp file
File, directory-resource.lisp: The org․melusina․webmachine/src/directory-resource․lisp file
File, file-resource.lisp: The org․melusina․webmachine/src/file-resource․lisp file
File, media-type.lisp: The org․melusina․webmachine/src/media-type․lisp file
File, org.melusina.webmachine.asd: The org․melusina․webmachine/org․melusina․webmachine․asd file
File, package.lisp: The org․melusina․webmachine/src/package․lisp file
File, path.lisp: The org․melusina․webmachine/src/path․lisp file
File, reply.lisp: The org․melusina․webmachine/src/reply․lisp file
File, request-method.lisp: The org․melusina․webmachine/src/request-method․lisp file
File, request.lisp: The org․melusina․webmachine/src/request․lisp file
File, resource.lisp: The org․melusina․webmachine/src/resource․lisp file
File, utilities.lisp: The org․melusina․webmachine/src/utilities․lisp file
file-resource: Public classes
file-resource.lisp: The org․melusina․webmachine/src/file-resource․lisp file
font-reply: Public classes

G
get-request: Public classes

H
head-request: Public classes
http-condition: Public conditions
http-error: Public conditions

I
image-reply: Public classes
image/jpeg-reply: Public classes
image/png-reply: Public classes
image/svg+xml-reply: Public classes

M
media-type: Public classes
media-type.lisp: The org․melusina․webmachine/src/media-type․lisp file
model-reply: Public classes
Module, src: The org․melusina․webmachine/src module

O
options-request: Public classes
org.melusina.webmachine: The org․melusina․webmachine system
org.melusina.webmachine: The org․melusina․webmachine package
org.melusina.webmachine.asd: The org․melusina․webmachine/org․melusina․webmachine․asd file

P
Package, org.melusina.webmachine: The org․melusina․webmachine package
package.lisp: The org․melusina․webmachine/src/package․lisp file
patch-request: Public classes
path.lisp: The org․melusina․webmachine/src/path․lisp file
post-request: Public classes
put-request: Public classes

R
reply: Public classes
reply.lisp: The org․melusina․webmachine/src/reply․lisp file
request: Public classes
request-method: Public classes
request-method.lisp: The org․melusina․webmachine/src/request-method․lisp file
request.lisp: The org․melusina․webmachine/src/request․lisp file
resource: Public classes
resource.lisp: The org․melusina․webmachine/src/resource․lisp file

S
src: The org․melusina․webmachine/src module
ssl-acceptor: Public classes
System, org.melusina.webmachine: The org․melusina․webmachine system

T
text-reply: Public classes
text/css-reply: Public classes
text/html-reply: Public classes
text/javascript-reply: Public classes
text/plain-reply: Public classes
trace-request: Public classes

U
utilities.lisp: The org․melusina․webmachine/src/utilities․lisp file

V
video-reply: Public classes