The hunchentoot Reference Manual

Table of Contents

Next: , Previous: , Up: (dir)   [Contents][Index]

The hunchentoot Reference Manual

This is the hunchentoot Reference Manual, version 1.2.38, generated automatically by Declt version 2.4 "Will Decker" on Wed Jun 20 11:59:57 2018 GMT+0.


Next: , Previous: , Up: Top   [Contents][Index]

1 Introduction

Complete documentation for Hunchentoot including details about how to
install it can be found in the 'doc' directory.

Join the chat at https://gitter.im/edicl/hunchentoot


Next: , Previous: , Up: Top   [Contents][Index]

2 Systems

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


Previous: , Up: Systems   [Contents][Index]

2.1 hunchentoot

License

BSD-2-Clause

Description

Hunchentoot is a HTTP server based on USOCKET and BORDEAUX-THREADS. It supports HTTP 1.1, serves static files, has a simple framework for user-defined handlers and can be extended through subclassing.

Version

1.2.38

Dependencies
Source

hunchentoot.asd (file)

Components

Next: , Previous: , Up: Top   [Contents][Index]

3 Modules

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


Previous: , Up: Modules   [Contents][Index]

3.1 hunchentoot/url-rewrite

Parent

hunchentoot (system)

Location

url-rewrite/

Components

Next: , Previous: , Up: Top   [Contents][Index]

4 Files

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


Previous: , Up: Files   [Contents][Index]

4.1 Lisp


Next: , Previous: , Up: Lisp files   [Contents][Index]

4.1.1 hunchentoot.asd

Location

hunchentoot.asd

Systems

hunchentoot (system)

Packages

hunchentoot-asd


Next: , Previous: , Up: Lisp files   [Contents][Index]

4.1.2 hunchentoot/url-rewrite/packages.lisp

Parent

url-rewrite (module)

Location

url-rewrite/packages.lisp

Packages

url-rewrite


Next: , Previous: , Up: Lisp files   [Contents][Index]

4.1.3 hunchentoot/url-rewrite/specials.lisp

Dependency

packages.lisp (file)

Parent

url-rewrite (module)

Location

url-rewrite/specials.lisp

Exported Definitions
Internal Definitions

Next: , Previous: , Up: Lisp files   [Contents][Index]

4.1.4 hunchentoot/url-rewrite/primitives.lisp

Dependency

specials.lisp (file)

Parent

url-rewrite (module)

Location

url-rewrite/primitives.lisp

Internal Definitions

Next: , Previous: , Up: Lisp files   [Contents][Index]

4.1.5 hunchentoot/url-rewrite/util.lisp

Dependency

primitives.lisp (file)

Parent

url-rewrite (module)

Location

url-rewrite/util.lisp

Internal Definitions

Next: , Previous: , Up: Lisp files   [Contents][Index]

4.1.6 hunchentoot/url-rewrite/url-rewrite.lisp

Dependency

util.lisp (file)

Parent

url-rewrite (module)

Location

url-rewrite/url-rewrite.lisp

Exported Definitions

Next: , Previous: , Up: Lisp files   [Contents][Index]

4.1.7 hunchentoot/packages.lisp

Dependency

url-rewrite (module)

Parent

hunchentoot (system)

Location

packages.lisp

Packages

hunchentoot


Next: , Previous: , Up: Lisp files   [Contents][Index]

4.1.8 hunchentoot/compat.lisp

Dependency

packages.lisp (file)

Parent

hunchentoot (system)

Location

compat.lisp

Internal Definitions

Next: , Previous: , Up: Lisp files   [Contents][Index]

4.1.9 hunchentoot/specials.lisp

Dependency

compat.lisp (file)

Parent

hunchentoot (system)

Location

specials.lisp

Exported Definitions
Internal Definitions

Next: , Previous: , Up: Lisp files   [Contents][Index]

4.1.10 hunchentoot/conditions.lisp

Dependency

specials.lisp (file)

Parent

hunchentoot (system)

Location

conditions.lisp

Exported Definitions
Internal Definitions

Next: , Previous: , Up: Lisp files   [Contents][Index]

4.1.11 hunchentoot/mime-types.lisp

Dependency

conditions.lisp (file)

Parent

hunchentoot (system)

Location

mime-types.lisp

Exported Definitions

mime-type (function)

Internal Definitions

Next: , Previous: , Up: Lisp files   [Contents][Index]

4.1.12 hunchentoot/util.lisp

Dependency

mime-types.lisp (file)

Parent

hunchentoot (system)

Location

util.lisp

Exported Definitions
Internal Definitions

Next: , Previous: , Up: Lisp files   [Contents][Index]

4.1.13 hunchentoot/log.lisp

Dependency

util.lisp (file)

Parent

hunchentoot (system)

Location

log.lisp

Internal Definitions

with-log-stream (macro)


Next: , Previous: , Up: Lisp files   [Contents][Index]

4.1.14 hunchentoot/cookie.lisp

Dependency

log.lisp (file)

Parent

hunchentoot (system)

Location

cookie.lisp

Exported Definitions
Internal Definitions

Next: , Previous: , Up: Lisp files   [Contents][Index]

4.1.15 hunchentoot/reply.lisp

Dependency

cookie.lisp (file)

Parent

hunchentoot (system)

Location

reply.lisp

Exported Definitions
Internal Definitions

header-out-set-p (function)


Next: , Previous: , Up: Lisp files   [Contents][Index]

4.1.16 hunchentoot/request.lisp

Dependency

reply.lisp (file)

Parent

hunchentoot (system)

Location

request.lisp

Exported Definitions
Internal Definitions

Next: , Previous: , Up: Lisp files   [Contents][Index]

4.1.17 hunchentoot/session.lisp

Dependency

request.lisp (file)

Parent

hunchentoot (system)

Location

session.lisp

Exported Definitions
Internal Definitions

Next: , Previous: , Up: Lisp files   [Contents][Index]

4.1.18 hunchentoot/misc.lisp

Dependency

session.lisp (file)

Parent

hunchentoot (system)

Location

misc.lisp

Exported Definitions
Internal Definitions

Next: , Previous: , Up: Lisp files   [Contents][Index]

4.1.19 hunchentoot/headers.lisp

Dependency

misc.lisp (file)

Parent

hunchentoot (system)

Location

headers.lisp

Exported Definitions

send-headers (function)

Internal Definitions

Next: , Previous: , Up: Lisp files   [Contents][Index]

4.1.20 hunchentoot/set-timeouts.lisp

Dependency

headers.lisp (file)

Parent

hunchentoot (system)

Location

set-timeouts.lisp

Internal Definitions

set-timeouts (function)


Next: , Previous: , Up: Lisp files   [Contents][Index]

4.1.21 hunchentoot/taskmaster.lisp

Dependency

set-timeouts.lisp (file)

Parent

hunchentoot (system)

Location

taskmaster.lisp

Exported Definitions
Internal Definitions

Next: , Previous: , Up: Lisp files   [Contents][Index]

4.1.22 hunchentoot/acceptor.lisp

Dependency

taskmaster.lisp (file)

Parent

hunchentoot (system)

Location

acceptor.lisp

Exported Definitions
Internal Definitions

Next: , Previous: , Up: Lisp files   [Contents][Index]

4.1.23 hunchentoot/ssl.lisp

Dependency

acceptor.lisp (file)

Parent

hunchentoot (system)

Location

ssl.lisp

Exported Definitions

Previous: , Up: Lisp files   [Contents][Index]

4.1.24 hunchentoot/easy-handlers.lisp

Dependency

ssl.lisp (file)

Parent

hunchentoot (system)

Location

easy-handlers.lisp

Exported Definitions
Internal Definitions

Next: , Previous: , Up: Top   [Contents][Index]

5 Packages

Packages are listed by definition order.


Next: , Previous: , Up: Packages   [Contents][Index]

5.1 hunchentoot-asd

Source

hunchentoot.asd

Use List

Next: , Previous: , Up: Packages   [Contents][Index]

5.2 url-rewrite

Source

packages.lisp (file)

Use List

common-lisp

Used By List

hunchentoot

Exported Definitions
Internal Definitions

Previous: , Up: Packages   [Contents][Index]

5.3 hunchentoot

Source

packages.lisp (file)

Nickname

tbnl

Use List
Exported Definitions
Internal Definitions

Next: , Previous: , Up: Top   [Contents][Index]

6 Definitions

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


Next: , Previous: , Up: Definitions   [Contents][Index]

6.1 Exported definitions


Next: , Previous: , Up: Exported definitions   [Contents][Index]

6.1.1 Constants

Constant: +http-accepted+

HTTP return code (202) for ’Accepted’.

Package

hunchentoot

Source

specials.lisp (file)

Constant: +http-authorization-required+

HTTP return code (401) for ’Authorization Required’.

Package

hunchentoot

Source

specials.lisp (file)

Constant: +http-bad-gateway+

HTTP return code (502) for ’Bad Gateway’.

Package

hunchentoot

Source

specials.lisp (file)

Constant: +http-bad-request+

HTTP return code (400) for ’Bad Request’.

Package

hunchentoot

Source

specials.lisp (file)

Constant: +http-conflict+

HTTP return code (409) for ’Conflict’.

Package

hunchentoot

Source

specials.lisp (file)

Constant: +http-continue+

HTTP return code (100) for ’Continue’.

Package

hunchentoot

Source

specials.lisp (file)

Constant: +http-created+

HTTP return code (201) for ’Created’.

Package

hunchentoot

Source

specials.lisp (file)

Constant: +http-expectation-failed+

HTTP return code (417) for ’Expectation Failed’.

Package

hunchentoot

Source

specials.lisp (file)

Constant: +http-failed-dependency+

HTTP return code (424) for ’Failed Dependency’.

Package

hunchentoot

Source

specials.lisp (file)

Constant: +http-forbidden+

HTTP return code (403) for ’Forbidden’.

Package

hunchentoot

Source

specials.lisp (file)

Constant: +http-gateway-time-out+

HTTP return code (504) for ’Gateway Time-out’.

Package

hunchentoot

Source

specials.lisp (file)

Constant: +http-gone+

HTTP return code (410) for ’Gone’.

Package

hunchentoot

Source

specials.lisp (file)

Constant: +http-internal-server-error+

HTTP return code (500) for ’Internal Server Error’.

Package

hunchentoot

Source

specials.lisp (file)

Constant: +http-length-required+

HTTP return code (411) for ’Length Required’.

Package

hunchentoot

Source

specials.lisp (file)

Constant: +http-method-not-allowed+

HTTP return code (405) for ’Method Not Allowed’.

Package

hunchentoot

Source

specials.lisp (file)

Constant: +http-moved-permanently+

HTTP return code (301) for ’Moved Permanently’.

Package

hunchentoot

Source

specials.lisp (file)

Constant: +http-moved-temporarily+

HTTP return code (302) for ’Moved Temporarily’.

Package

hunchentoot

Source

specials.lisp (file)

Constant: +http-multi-status+

HTTP return code (207) for ’Multi-Status’.

Package

hunchentoot

Source

specials.lisp (file)

Constant: +http-multiple-choices+

HTTP return code (300) for ’Multiple Choices’.

Package

hunchentoot

Source

specials.lisp (file)

Constant: +http-network-authentication-required+

HTTP return code (511) for ’Network Authentication Required’.

Package

hunchentoot

Source

specials.lisp (file)

Constant: +http-no-content+

HTTP return code (204) for ’No Content’.

Package

hunchentoot

Source

specials.lisp (file)

Constant: +http-non-authoritative-information+

HTTP return code (203) for ’Non-Authoritative Information’.

Package

hunchentoot

Source

specials.lisp (file)

Constant: +http-not-acceptable+

HTTP return code (406) for ’Not Acceptable’.

Package

hunchentoot

Source

specials.lisp (file)

Constant: +http-not-found+

HTTP return code (404) for ’Not Found’.

Package

hunchentoot

Source

specials.lisp (file)

Constant: +http-not-implemented+

HTTP return code (501) for ’Not Implemented’.

Package

hunchentoot

Source

specials.lisp (file)

Constant: +http-not-modified+

HTTP return code (304) for ’Not Modified’.

Package

hunchentoot

Source

specials.lisp (file)

Constant: +http-ok+

HTTP return code (200) for ’OK’.

Package

hunchentoot

Source

specials.lisp (file)

Constant: +http-partial-content+

HTTP return code (206) for ’Partial Content’.

Package

hunchentoot

Source

specials.lisp (file)

Constant: +http-payment-required+

HTTP return code (402) for ’Payment Required’.

Package

hunchentoot

Source

specials.lisp (file)

Constant: +http-precondition-failed+

HTTP return code (412) for ’Precondition Failed’.

Package

hunchentoot

Source

specials.lisp (file)

Constant: +http-precondition-required+

HTTP return code (428) for ’Precondition Required’.

Package

hunchentoot

Source

specials.lisp (file)

Constant: +http-proxy-authentication-required+

HTTP return code (407) for ’Proxy Authentication Required’.

Package

hunchentoot

Source

specials.lisp (file)

Constant: +http-request-entity-too-large+

HTTP return code (413) for ’Request Entity Too Large’.

Package

hunchentoot

Source

specials.lisp (file)

Constant: +http-request-header-fields-too-large+

HTTP return code (431) for ’Request Header Fields Too Large’.

Package

hunchentoot

Source

specials.lisp (file)

Constant: +http-request-time-out+

HTTP return code (408) for ’Request Time-out’.

Package

hunchentoot

Source

specials.lisp (file)

Constant: +http-request-uri-too-large+

HTTP return code (414) for ’Request-URI Too Large’.

Package

hunchentoot

Source

specials.lisp (file)

Constant: +http-requested-range-not-satisfiable+

HTTP return code (416) for ’Requested range not satisfiable’.

Package

hunchentoot

Source

specials.lisp (file)

Constant: +http-reset-content+

HTTP return code (205) for ’Reset Content’.

Package

hunchentoot

Source

specials.lisp (file)

Constant: +http-see-other+

HTTP return code (303) for ’See Other’.

Package

hunchentoot

Source

specials.lisp (file)

Constant: +http-service-unavailable+

HTTP return code (503) for ’Service Unavailable’.

Package

hunchentoot

Source

specials.lisp (file)

Constant: +http-switching-protocols+

HTTP return code (101) for ’Switching Protocols’.

Package

hunchentoot

Source

specials.lisp (file)

Constant: +http-temporary-redirect+

HTTP return code (307) for ’Temporary Redirect’.

Package

hunchentoot

Source

specials.lisp (file)

Constant: +http-too-many-requests+

HTTP return code (429) for ’Too Many Requests’.

Package

hunchentoot

Source

specials.lisp (file)

Constant: +http-unsupported-media-type+

HTTP return code (415) for ’Unsupported Media Type’.

Package

hunchentoot

Source

specials.lisp (file)

Constant: +http-use-proxy+

HTTP return code (305) for ’Use Proxy’.

Package

hunchentoot

Source

specials.lisp (file)

Constant: +http-version-not-supported+

HTTP return code (505) for ’Version not supported’.

Package

hunchentoot

Source

specials.lisp (file)


Next: , Previous: , Up: Exported definitions   [Contents][Index]

6.1.2 Special variables

Special Variable: *acceptor*

The current ACCEPTOR object while in the context of a request.

Package

hunchentoot

Source

specials.lisp (file)

Special Variable: *catch-errors-p*

Whether Hunchentoot should catch and log errors (or rather invoke the debugger).

Package

hunchentoot

Source

specials.lisp (file)

Special Variable: *content-types-for-url-rewrite*

The content types for which url-rewriting is OK. See *REWRITE-FOR-SESSION-URLS*.

Package

hunchentoot

Source

specials.lisp (file)

Special Variable: *default-connection-timeout*

The default connection timeout used when an acceptor is reading from and writing to a socket stream.

Package

hunchentoot

Source

specials.lisp (file)

Special Variable: *default-content-type*

The default content-type header which is returned to the client. If this is text content type, the character set used for encoding the response will automatically be added to the content type in a “charset” attribute.

Package

hunchentoot

Source

specials.lisp (file)

Special Variable: *dispatch-table*

A global list of dispatch functions.

Package

hunchentoot

Source

easy-handlers.lisp (file)

Special Variable: *file-upload-hook*

If this is not NIL, it should be a unary function which will be called with a pathname for each file which is uploaded to Hunchentoot. The pathname denotes the temporary file to which the uploaded file is written. The hook is called directly before the file is created.

Package

hunchentoot

Source

specials.lisp (file)

Special Variable: *header-stream*

If this variable is not NIL, it should be bound to a stream to which incoming and outgoing headers will be written for debugging purposes.

Package

hunchentoot

Source

specials.lisp (file)

Special Variable: *hunchentoot-default-external-format*

The external format used to compute the REQUEST object.

Package

hunchentoot

Source

specials.lisp (file)

Special Variable: *hunchentoot-version*
Package

hunchentoot

Source

specials.lisp (file)

Special Variable: *lisp-errors-log-level*

Log level for Lisp errors. Should be one of :ERROR (the default), :WARNING, or :INFO.

Package

hunchentoot

Source

specials.lisp (file)

Special Variable: *lisp-warnings-log-level*

Log level for Lisp warnings. Should be one of :ERROR, :WARNING (the default), or :INFO.

Package

hunchentoot

Source

specials.lisp (file)

Special Variable: *log-lisp-backtraces-p*

Whether Lisp backtraces should be logged. Only has an effect if *LOG-LISP-ERRORS-P* is true as well.

Package

hunchentoot

Source

specials.lisp (file)

Special Variable: *log-lisp-errors-p*

Whether Lisp errors in request handlers should be logged.

Package

hunchentoot

Source

specials.lisp (file)

Special Variable: *log-lisp-warnings-p*

Whether Lisp warnings in request handlers should be logged.

Package

hunchentoot

Source

specials.lisp (file)

Special Variable: *methods-for-post-parameters*

A list of the request method types (as keywords) for which Hunchentoot will try to compute POST-PARAMETERS.

Package

hunchentoot

Source

specials.lisp (file)

Special Variable: *reply*

The current REPLY object while in the context of a request.

Package

hunchentoot

Source

specials.lisp (file)

Special Variable: *request*

The current REQUEST object while in the context of a request.

Package

hunchentoot

Source

specials.lisp (file)

Special Variable: *rewrite-for-session-urls*

Whether HTML pages should possibly be rewritten for cookie-less session-management.

Package

hunchentoot

Source

specials.lisp (file)

Special Variable: *session*

The current session while in the context of a request, or NIL.

Package

hunchentoot

Source

specials.lisp (file)

Special Variable: *session-gc-frequency*

A session GC (see function SESSION-GC) will happen every *SESSION-GC-FREQUENCY* requests (counting only requests which create a new session) if this variable is not NIL. See SESSION-CREATED.

Package

hunchentoot

Source

specials.lisp (file)

Special Variable: *session-max-time*

The default time (in seconds) after which a session times out.

Package

hunchentoot

Source

specials.lisp (file)

Special Variable: *session-secret*

A random ASCII string that’s used to encode the public session data. This variable is initially unbound and will be set (using RESET-SESSION-SECRET) the first time a session is created, if necessary. You can prevent this from happening if you set the value yourself before starting acceptors.

Package

hunchentoot

Source

specials.lisp (file)

Special Variable: *show-lisp-backtraces-p*

Whether Lisp errors shown in HTML output should contain backtrace information.

Package

hunchentoot

Source

specials.lisp (file)

Special Variable: *show-lisp-errors-p*

Whether Lisp errors in request handlers should be shown in HTML output.

Package

hunchentoot

Source

specials.lisp (file)

Special Variable: *tmp-directory*

Directory for temporary files created by MAKE-TMP-FILE-NAME.

Package

hunchentoot

Source

specials.lisp (file)

Special Variable: *url-rewrite-fill-tags*

The tag/attribute combinations where URL-rewriting should optionally add an attribute.

Package

url-rewrite

Source

specials.lisp (file)

Special Variable: *url-rewrite-tags*

The tag/attribute combinations where URL-rewriting should happen.

Package

url-rewrite

Source

specials.lisp (file)

Special Variable: *use-remote-addr-for-sessions*

Whether the client’s remote IP (as returned by REAL-REMOTE-ADDR) should be encoded into the session string. If this value is true, a session will cease to be accessible if the client’s remote IP changes.

This might for example be an issue if the client uses a proxy server which doesn’t send correct ’X_FORWARDED_FOR’ headers.

Package

hunchentoot

Source

specials.lisp (file)

Special Variable: *use-user-agent-for-sessions*

Whether the ’User-Agent’ header should be encoded into the session string. If this value is true, a session will cease to be accessible if the client sends a different ’User-Agent’ header.

Package

hunchentoot

Source

specials.lisp (file)


Next: , Previous: , Up: Exported definitions   [Contents][Index]

6.1.3 Macros

Macro: define-easy-handler DESCRIPTION LAMBDA-LIST &body BODY

Defines a handler with the body BODY and optionally registers
it with a URI so that it will be found by DISPATCH-EASY-HANDLERS. DESCRIPTION is either a symbol NAME or a list matching the
destructuring lambda list

(name &key uri acceptor-names default-parameter-type default-request-type).

LAMBDA-LIST is a list the elements of which are either a symbol
VAR or a list matching the destructuring lambda list

(var &key real-name parameter-type init-form request-type).

The resulting handler will be a Lisp function with the name NAME
and keyword parameters named by the VAR symbols. Each VAR will
be bound to the value of the GET or POST parameter called
REAL-NAME (a string) before BODY is executed. If REAL-NAME is
not provided, it will be computed by downcasing the symbol name
of VAR.

If URI (which is evaluated) is provided, then it must be a string or
a function designator for a function of one argument. In this case,
the handler will be returned by DISPATCH-EASY-HANDLERS, if URI is a string and the script name of a request is URI, or if URI designates a function and applying this function to the current request object
returns a true value.

ACCEPTOR-NAMES (which is evaluated) can be a list of symbols which
means that the handler will be returned by DISPATCH-EASY-HANDLERS in acceptors which have one of these names (see ACCEPTOR-NAME). ACCEPTOR-NAMES can also be the symbol T which means that the handler
will be returned by DISPATCH-EASY-HANDLERS in every acceptor.

Whether the GET or POST parameter (or both) will be taken into consideration, depends on REQUEST-TYPE which can
be :GET, :POST, :BOTH, or NIL. In the last case, the value of DEFAULT-REQUEST-TYPE (the default of which is :BOTH) will be
used.

The value of VAR will usually be a string (unless it resulted from a
file upload in which case it won’t be converted at all), but if PARAMETER-TYPE (which is evaluated) is provided, the string will be converted to another Lisp type by the following rules:

If the corresponding GET or POST parameter wasn’t provided by the
client, VAR’s value will be NIL. If PARAMETER-TYPE is ’STRING, VAR’s value remains as is. If PARAMETER-TYPE is ’INTEGER and the parameter string consists solely of decimal digits, VAR’s value will be the corresponding integer, otherwise NIL. If PARAMETER-TYPE is ’KEYWORD, VAR’s value will be the keyword obtained by interning the upcased parameter string into the keyword package. If PARAMETER-TYPE is ’CHARACTER and the parameter string is of length one, VAR’s value will
be the single character of this string, otherwise NIL. If
PARAMETER-TYPE is ’BOOLEAN, VAR’s value will always be T (unless it
is NIL by the first rule above, of course). If PARAMETER-TYPE is any other atom, it is supposed to be a function designator for a unary function which will be called to convert the string to something else.

Those were the rules for ‘simple’ types, but PARAMETER-TYPE can
also be a list starting with one of the symbols LIST, ARRAY, or HASH-TABLE. The second value of the list must always be a simple parameter type as in the last paragraph - we’ll call it the
‘inner type’ below.

In the case of ’LIST, all GET/POST parameters called REAL-NAME
will be collected, converted to the inner type, and assembled
into a list which will be the value of VAR.

In the case of ’ARRAY, all GET/POST parameters which have a name
like the result of

(format nil "~A[~A]" real-name n)

where N is a non-negative integer, will be assembled into an
array where the Nth element will be set accordingly, after
conversion to the inner type. The array, which will become the
value of VAR, will be big enough to hold all matching parameters,
but not bigger. Array elements not set as described above will
be NIL. Note that VAR will always be bound to an array, which
may be empty, so it will never be NIL, even if no appropriate
GET/POST parameters are found.

The full form of a ’HASH-TABLE parameter type is

(hash-table inner-type key-type test-function),

but KEY-TYPE and TEST-FUNCTION can be left out in which case they
default to ’STRING and ’EQUAL, respectively. For this parameter
type, all GET/POST parameters which have a name like the result
of

(format nil "~A{~A}" real-name key)

(where KEY is a string that doesn’t contain curly brackets) will
become the values (after conversion to INNER-TYPE) of a hash
table with test function TEST-FUNCTION where KEY (after
conversion to KEY-TYPE) will be the corresponding key. Note that
VAR will always be bound to a hash table, which may be empty, so
it will never be NIL, even if no appropriate GET/POST parameters
are found.

To make matters even more complicated, the three compound
parameter types also have an abbreviated form - just one of the
symbols LIST, ARRAY, or HASH-TABLE. In this case, the inner type
will default to ’STRING.

If PARAMETER-TYPE is not provided or NIL, DEFAULT-PARAMETER-TYPE
(the default of which is ’STRING) will be used instead.

If the result of the computations above would be that VAR would
be bound to NIL, then INIT-FORM (if provided) will be evaluated
instead, and VAR will be bound to the result of this evaluation.

Handlers built with this macro are constructed in such a way that
the resulting Lisp function is useful even outside of
Hunchentoot. Specifically, all the parameter computations above
will only happen if *REQUEST* is bound, i.e. if we’re within a Hunchentoot request. Otherwise, VAR will always be bound to the
result of evaluating INIT-FORM unless a corresponding keyword
argument is provided.

Package

hunchentoot

Source

easy-handlers.lisp (file)


Next: , Previous: , Up: Exported definitions   [Contents][Index]

6.1.4 Functions

Function: abort-request-handler &optional RESULT

This function can be called by a request handler at any time to immediately abort handling the request. This works as if the handler had returned RESULT. See the source code of REDIRECT for an example.

Package

hunchentoot

Source

misc.lisp (file)

Function: add-get-param-to-url URL NAME VALUE

URL is assumed to be a http URL. The pair of NAME and VALUE will be added as a GET parameter to this URL. Assumes that there’s no other parameter of the same name. Only checks if #? is part of the string to decide how to attach the new parameter to the end of the string.

Package

url-rewrite

Source

url-rewrite.lisp (file)

Function: authorization &optional REQUEST

Returns as two values the user and password (if any) as encoded in the ’AUTHORIZATION’ header. Returns NIL if there is no such header.

Package

hunchentoot

Source

request.lisp (file)

Function: aux-request-value SYMBOL &optional REQUEST

Returns the value associated with SYMBOL from the request object REQUEST (the default is the current request) if it exists. The second return value is true if such a value was found.

Package

hunchentoot

Source

request.lisp (file)

Setf Expander

(setf aux-request-value) (setf expander)

Setf Expander: (setf aux-request-value) SYMBOL &optional REQUEST

Sets the value associated with SYMBOL from the request object REQUEST (default is *REQUEST*). If there is already a value associated with SYMBOL it will be replaced.

Package

hunchentoot

Source

request.lisp (file)

Reader

aux-request-value (function)

Function: client-as-string SOCKET

A helper function which returns the client’s address and port as a string and tries to act robustly in the presence of network problems.

Package

hunchentoot

Source

taskmaster.lisp (file)

Function: content-length* &optional REPLY

The outgoing ’Content-Length’ http header of REPLY.

Package

hunchentoot

Source

reply.lisp (file)

Writer

(setf content-length*) (function)

Function: (setf content-length*) NEW-VALUE &optional REPLY

Sets the outgoing ’Content-Length’ http header of REPLY.

Package

hunchentoot

Source

reply.lisp (file)

Reader

content-length* (function)

Function: content-type* &optional REPLY

The outgoing ’Content-Type’ http header of REPLY.

Package

hunchentoot

Source

reply.lisp (file)

Writer

(setf content-type*) (function)

Function: (setf content-type*) NEW-VALUE &optional REPLY

Sets the outgoing ’Content-Type’ http header of REPLY.

Package

hunchentoot

Source

reply.lisp (file)

Reader

content-type* (function)

Function: cookie-in NAME &optional REQUEST

Returns the cookie with the name NAME (a string) as sent by the browser - or NIL if there is none.

Package

hunchentoot

Source

request.lisp (file)

Function: cookie-out NAME &optional REPLY

Returns the current value of the outgoing cookie named NAME. Search is case-sensitive.

Package

hunchentoot

Source

reply.lisp (file)

Function: cookies-in* &optional REQUEST

Returns an alist of all cookies associated with the REQUEST object REQUEST.

Package

hunchentoot

Source

request.lisp (file)

Function: cookies-out* &optional REPLY

Returns an alist of the outgoing cookies associated with the REPLY object REPLY.

Package

hunchentoot

Source

reply.lisp (file)

Writer

(setf cookies-out*) (function)

Function: (setf cookies-out*) NEW-VALUE &optional REPLY

Sets the alist of the outgoing cookies associated with the REPLY object REPLY.

Package

hunchentoot

Source

reply.lisp (file)

Reader

cookies-out* (function)

Function: create-folder-dispatcher-and-handler URI-PREFIX BASE-PATH &optional CONTENT-TYPE

Creates and returns a dispatch function which will dispatch to a handler function which emits the file relative to BASE-PATH that is denoted by the URI of the request relative to URI-PREFIX. URI-PREFIX must be a string ending with a slash, BASE-PATH must be a pathname designator for an existing directory. If CONTENT-TYPE is not NIL, it’ll be the content type used for all files in the folder.

Package

hunchentoot

Source

misc.lisp (file)

Function: create-prefix-dispatcher PREFIX HANDLER

Creates a request dispatch function which will dispatch to the function denoted by HANDLER if the file name of the current request starts with the string PREFIX.

Package

hunchentoot

Source

misc.lisp (file)

Function: create-regex-dispatcher REGEX HANDLER

Creates a request dispatch function which will dispatch to the function denoted by HANDLER if the file name of the current request matches the CL-PPCRE regular expression REGEX.

Package

hunchentoot

Source

misc.lisp (file)

Function: create-static-file-dispatcher-and-handler URI PATH &optional CONTENT-TYPE

Creates and returns a request dispatch function which will dispatch to a handler function which emits the file denoted by the pathname designator PATH with content type CONTENT-TYPE if the SCRIPT-NAME of the request matches the string URI. If CONTENT-TYPE is NIL, tries to determine the content type via the file’s suffix.

Package

hunchentoot

Source

misc.lisp (file)

Function: default-document-directory &optional SUB-DIRECTORY
Package

hunchentoot

Source

acceptor.lisp (file)

Function: delete-aux-request-value SYMBOL &optional REQUEST

Removes the value associated with SYMBOL from the request object REQUEST.

Package

hunchentoot

Source

request.lisp (file)

Function: delete-session-value SYMBOL &optional SESSION

Removes the value associated with SYMBOL from SESSION if there is one.

Package

hunchentoot

Source

session.lisp (file)

Function: dispatch-easy-handlers REQUEST

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

Package

hunchentoot

Source

easy-handlers.lisp (file)

Function: escape-for-html STRING

Escapes the characters #\<, #\>, #\’, #\", and #\& for HTML output.

Package

hunchentoot

Source

util.lisp (file)

Function: get-parameter NAME &optional REQUEST

Returns the GET parameter with name NAME (a string) - or NIL if there is none. Search is case-sensitive.

Package

hunchentoot

Source

request.lisp (file)

Function: get-parameters* &optional REQUEST

Returns an alist of the GET parameters associated with the REQUEST object REQUEST.

Package

hunchentoot

Source

request.lisp (file)

Function: handle-if-modified-since TIME &optional REQUEST

Handles the ’If-Modified-Since’ header of REQUEST. The date string is compared to the one generated from the supplied universal time TIME.

Package

hunchentoot

Source

request.lisp (file)

Function: handle-static-file PATHNAME &optional CONTENT-TYPE

A function which acts like a Hunchentoot handler for the file denoted by PATHNAME. Sends a content type header corresponding to CONTENT-TYPE or (if that is NIL) tries to determine the content type via the file’s suffix.

Package

hunchentoot

Source

misc.lisp (file)

Function: header-in* NAME &optional REQUEST

Returns the incoming header with name NAME. NAME can be a keyword (recommended) or a string.

Package

hunchentoot

Source

request.lisp (file)

Function: header-out NAME &optional REPLY

Returns the current value of the outgoing http header named NAME. NAME should be a keyword or a string.

Package

hunchentoot

Source

reply.lisp (file)

Writer

(setf header-out) (generic function)

Function: headers-in* &optional REQUEST

Returns an alist of the incoming headers associated with the REQUEST object REQUEST.

Package

hunchentoot

Source

request.lisp (file)

Function: headers-out* &optional REPLY

Returns an alist of the outgoing headers associated with the REPLY object REPLY.

Package

hunchentoot

Source

reply.lisp (file)

Function: host &optional REQUEST

Returns the ’Host’ incoming http header value.

Package

hunchentoot

Source

request.lisp (file)

Function: http-token-p TOKEN

This function tests whether OBJECT is a non-empty string which is a TOKEN according to RFC 2068 (i.e. whether it may be used for, say, cookie names).

Package

hunchentoot

Source

util.lisp (file)

Function: hunchentoot-error FORMAT-CONTROL &rest FORMAT-ARGUMENTS

Signals an error of type HUNCHENTOOT-SIMPLE-ERROR with the provided format control and arguments.

Package

hunchentoot

Source

conditions.lisp (file)

Function: local-addr* &optional REQUEST

Returns the address the current request connected to.

Package

hunchentoot

Source

request.lisp (file)

Function: local-port* &optional REQUEST

Returns the port the current request connected to.

Package

hunchentoot

Source

request.lisp (file)

Function: log-message* LOG-LEVEL FORMAT-STRING &rest FORMAT-ARGUMENTS

Convenience function which calls the message logger of the current acceptor (if there is one) with the same arguments it accepts.

This is the function which Hunchentoot itself uses to log errors it catches during request processing.

Package

hunchentoot

Source

acceptor.lisp (file)

Function: mime-type PATHSPEC

Given a pathname designator PATHSPEC returns the MIME type (as a string) corresponding to the suffix of the file denoted by PATHSPEC (or NIL).

Package

hunchentoot

Source

mime-types.lisp (file)

Function: no-cache ()

Adds appropriate headers to completely prevent caching on most browsers.

Package

hunchentoot

Source

misc.lisp (file)

Function: parameter NAME &optional REQUEST

Returns the GET or the POST parameter with name NAME (a string) - or NIL if there is none. If both a GET and a POST parameter with the same name exist the GET parameter is returned. Search is case-sensitive.

Package

hunchentoot

Source

request.lisp (file)

Function: parameter-error FORMAT-CONTROL &rest FORMAT-ARGUMENTS

Signals an error of type PARAMETER-ERROR with the provided format control and arguments.

Package

hunchentoot

Source

conditions.lisp (file)

Function: post-parameter NAME &optional REQUEST

Returns the POST parameter with name NAME (a string) - or NIL if there is none. Search is case-sensitive.

Package

hunchentoot

Source

request.lisp (file)

Function: post-parameters* &optional REQUEST

Returns an alist of the POST parameters associated with the REQUEST object REQUEST.

Package

hunchentoot

Source

request.lisp (file)

Function: query-string* &optional REQUEST

Returns the query string of the REQUEST object REQUEST. That’s the part behind the question mark (i.e. the GET parameters).

Package

hunchentoot

Source

request.lisp (file)

Function: raw-post-data &key REQUEST EXTERNAL-FORMAT FORCE-TEXT FORCE-BINARY WANT-STREAM

Returns the content sent by the client if there was any (unless the content type was "multipart/form-data"). By default, the result is a string if the type of the ‘Content-Type’ media type is "text", and a vector of octets otherwise. In the case of a string, the external format to be used to decode the content will be determined from the ‘charset’ parameter sent by the client (or otherwise *HUNCHENTOOT-DEFAULT-EXTERNAL-FORMAT* will be used).

You can also provide an external format explicitly (through EXTERNAL-FORMAT) in which case the result will unconditionally be a string. Likewise, you can provide a true value for FORCE-TEXT which will force Hunchentoot to act as if the type of the media type had been "text". Or you can provide a true value for FORCE-BINARY which means that you want a vector of octets at any rate.

If, however, you provide a true value for WANT-STREAM, the other parameters are ignored and you’ll get the content (flexi) stream to read from it yourself. It is then your responsibility to read the correct amount of data, because otherwise you won’t be able to return a response to the client. If the content type of the request was ‘multipart/form-data’ or ‘application/x-www-form-urlencoded’, the content has been read by Hunchentoot already and you can’t read from the stream anymore.

You can call RAW-POST-DATA more than once per request, but you can’t mix calls which have different values for WANT-STREAM.

Note that this function is slightly misnamed because a client can send content even if the request method is not POST.

Package

hunchentoot

Source

request.lisp (file)

Function: real-remote-addr &optional REQUEST

Returns the ’X-Forwarded-For’ incoming http header as the second value in the form of a list of IP addresses and the first element of this list as the first value if this header exists. Otherwise returns the value of REMOTE-ADDR as the only value.

Package

hunchentoot

Source

request.lisp (file)

Function: reason-phrase RETURN-CODE

Returns a reason phrase for the HTTP return code RETURN-CODE (which should be an integer) or NIL for return codes Hunchentoot doesn’t know.

Package

hunchentoot

Source

util.lisp (file)

Function: recompute-request-parameters &key REQUEST EXTERNAL-FORMAT

Recomputes the GET and POST parameters for the REQUEST object REQUEST. This only makes sense if you’re switching external formats during the request.

Package

hunchentoot

Source

request.lisp (file)

Function: redirect TARGET &key HOST PORT PROTOCOL ADD-SESSION-ID CODE

Redirects the browser to TARGET which should be a string. If TARGET is a full URL starting with a scheme, HOST, PORT and PROTOCOL are ignored. Otherwise, TARGET should denote the path part of a URL, PROTOCOL must be one of the keywords :HTTP or :HTTPS, and the URL to redirect to will be constructed from HOST, PORT, PROTOCOL, and TARGET. Adds a session ID if ADD-SESSION-ID is true. If CODE is a 3xx redirection code, it will be sent as status code.

Package

hunchentoot

Source

misc.lisp (file)

Function: referer &optional REQUEST

Returns the ’Referer’ (sic!) http header.

Package

hunchentoot

Source

request.lisp (file)

Function: regenerate-session-cookie-value SESSION

Regenerates the cookie value. This should be used
when a user logs in according to the application to prevent against session fixation attacks. The cookie value being dependent on ID, USER-AGENT, REMOTE-ADDR, START, and *SESSION-SECRET*, the only value we can change is START to regenerate a new value. Since we’re generating a new cookie, it makes sense to have the session being restarted, in time. That said, because of this fact, calling this function twice in the same second will regenerate twice the same value.

Package

hunchentoot

Source

session.lisp (file)

Function: remote-addr* &optional REQUEST

Returns the address the current request originated from.

Package

hunchentoot

Source

request.lisp (file)

Function: remote-port* &optional REQUEST

Returns the port the current request originated from.

Package

hunchentoot

Source

request.lisp (file)

Function: remove-session SESSION

Completely removes the SESSION object SESSION from Hunchentoot’s internal session database.

Package

hunchentoot

Source

session.lisp (file)

Function: reply-external-format* &optional REPLY

The external format of REPLY which is used for character output.

Package

hunchentoot

Source

reply.lisp (file)

Writer

(setf reply-external-format*) (function)

Function: (setf reply-external-format*) NEW-VALUE &optional REPLY

Sets the external format of REPLY.

Package

hunchentoot

Source

reply.lisp (file)

Reader

reply-external-format* (function)

Function: request-method* &optional REQUEST

Returns the request method as a Lisp keyword.

Package

hunchentoot

Source

request.lisp (file)

Function: request-pathname &optional REQUEST DROP-PREFIX

Construct a relative pathname from the request’s SCRIPT-NAME.
If DROP-PREFIX is given, pathname construction starts at the first path segment after the prefix.

Package

hunchentoot

Source

request.lisp (file)

Function: request-uri* &optional REQUEST

Returns the request URI.

Package

hunchentoot

Source

request.lisp (file)

Function: require-authorization &optional REALM

Sends back appropriate headers to require basic HTTP authentication (see RFC 2617) for the realm REALM.

Package

hunchentoot

Source

misc.lisp (file)

Function: reset-session-secret ()

Sets *SESSION-SECRET* to a new random value. All old sessions will cease to be valid.

Package

hunchentoot

Source

session.lisp (file)

Function: reset-sessions &optional ACCEPTOR

Removes ALL stored sessions of ACCEPTOR.

Package

hunchentoot

Source

session.lisp (file)

Function: return-code* &optional REPLY

The http return code of REPLY. The return codes Hunchentoot can handle are defined in specials.lisp.

Package

hunchentoot

Source

reply.lisp (file)

Writer

(setf return-code*) (function)

Function: (setf return-code*) NEW-VALUE &optional REPLY

Sets the http return code of REPLY.

Package

hunchentoot

Source

reply.lisp (file)

Reader

return-code* (function)

Function: rewrite-urls REWRITE-FN &optional TEST-FN

Reads an (X)HTML document from *STANDARD-INPUT* and writes it back to *STANDARD-OUTPUT*. Any attribute value which is in one of the positions denoted by *URL-REWRITE-TAGS* is rewritten by REWRITE-FN if it passes the test denoted by the optional function TEST-FN which defaults to the complement of STARTS-WITH-SCHEME-P.

This function aims to yield correct results for correct (X)HTML input and it also tries hard to never signal an error although it may warn if it encounters syntax errors. It will NOT detect any possible error nor is there any warranty that it will work correctly with faulty input.

Package

url-rewrite

Source

url-rewrite.lisp (file)

Function: rfc-1123-date &optional TIME

Generates a time string according to RFC 1123. Default is current time. This can be used to send a ’Last-Modified’ header - see HANDLE-IF-MODIFIED-SINCE.

Package

hunchentoot

Source

util.lisp (file)

Function: script-name* &optional REQUEST

Returns the file name of the REQUEST object REQUEST. That’s the requested URI without the query string (i.e the GET parameters).

Package

hunchentoot

Source

request.lisp (file)

Function: send-headers ()

Sends the initial status line and all headers as determined by the REPLY object *REPLY*. Returns a binary stream to which the body of the reply can be written. Once this function has been called, further changes to *REPLY* don’t have any effect. Also, automatic handling of errors (i.e. sending the corresponding status code to the browser, etc.) is turned off for this request. If your handlers return the full body as a string or as an array of octets you should NOT call this function.

This function does not return control to the caller during HEAD request processing.

Package

hunchentoot

Source

headers.lisp (file)

Function: server-protocol* &optional REQUEST

Returns the request protocol as a Lisp keyword.

Package

hunchentoot

Source

request.lisp (file)

Function: session-gc ()

Removes sessions from the current session database which are too old - see SESSION-TOO-OLD-P.

Package

hunchentoot

Source

session.lisp (file)

Function: session-too-old-p SESSION

Returns true if the SESSION object SESSION has not been active in the last (SESSION-MAX-TIME SESSION) seconds.

Package

hunchentoot

Source

session.lisp (file)

Function: session-value SYMBOL &optional SESSION

Returns the value associated with SYMBOL from the session object SESSION (the default is the current session) if it exists.

Package

hunchentoot

Source

session.lisp (file)

Setf Expander

(setf session-value) (setf expander)

Setf Expander: (setf session-value) SYMBOL &optional SESSION

Sets the value associated with SYMBOL from the session object SESSION. If there is already a value associated with SYMBOL it will be replaced. Will automatically start a session if none was supplied and there’s no session for the current request.

Package

hunchentoot

Source

session.lisp (file)

Reader

session-value (function)

Function: set-cookie NAME &key VALUE EXPIRES MAX-AGE PATH DOMAIN SECURE HTTP-ONLY REPLY

Creates a cookie object from the parameters provided and adds it to the outgoing cookies of the REPLY object REPLY. If a cookie with the name NAME (case-sensitive) already exists, it is replaced.

Package

hunchentoot

Source

cookie.lisp (file)

Function: set-cookie* COOKIE &optional REPLY

Adds the COOKIE object COOKIE to the outgoing cookies of the REPLY object REPLY. If a cookie with the same name (case-sensitive) already exists, it is replaced.

Package

hunchentoot

Source

cookie.lisp (file)

Function: ssl-p &optional ACCEPTOR

Whether the current connection to the client is secure. See ACCEPTOR-SSL-P.

Package

hunchentoot

Source

util.lisp (file)

Function: start-session ()

Returns the current SESSION object. If there is no current session, creates one and updates the corresponding data structures. In this case the function will also send a session cookie to the browser.

Package

hunchentoot

Source

session.lisp (file)

Function: starts-with-scheme-p STRING

Checks whether the string STRING represents a URL which starts with a scheme, i.e. something like ’https://’ or ’mailto:’.

Package

url-rewrite

Source

url-rewrite.lisp (file)

Function: url-decode STRING &optional EXTERNAL-FORMAT

Decodes a URL-encoded string which is assumed to be encoded using the external format EXTERNAL-FORMAT, i.e. this is the inverse of URL-ENCODE. It is assumed that you’ll rarely need this function, if ever. But just in case - here it is. The default for EXTERNAL-FORMAT is the value of *HUNCHENTOOT-DEFAULT-EXTERNAL-FORMAT*.

Package

hunchentoot

Source

util.lisp (file)

Function: url-encode STRING

URL-encode a string.

Package

url-rewrite

Source

url-rewrite.lisp (file)

Function: url-encode STRING &optional EXTERNAL-FORMAT

URL-encodes a string using the external format EXTERNAL-FORMAT. The default for EXTERNAL-FORMAT is the value of *HUNCHENTOOT-DEFAULT-EXTERNAL-FORMAT*.

Package

hunchentoot

Source

util.lisp (file)

Function: user-agent &optional REQUEST

Returns the ’User-Agent’ http header.

Package

hunchentoot

Source

request.lisp (file)

Function: within-request-p ()

True if we’re in the context of a request, otherwise nil.

Package

hunchentoot

Source

request.lisp (file)


Next: , Previous: , Up: Exported definitions   [Contents][Index]

6.1.5 Generic functions

Generic Function: accept-connections ACCEPTOR

In a loop, accepts a connection and hands it over
to the acceptor’s taskmaster for processing using HANDLE-INCOMING-CONNECTION. On LispWorks, this function returns immediately, on other Lisps it retusn only once the acceptor has been stopped.

Package

hunchentoot

Source

acceptor.lisp (file)

Methods
Method: accept-connections (ACCEPTOR acceptor)
Generic Function: acceptor-access-log-destination OBJECT
Generic Function: (setf acceptor-access-log-destination) NEW-VALUE OBJECT
Package

hunchentoot

Methods
Method: acceptor-access-log-destination (ACCEPTOR acceptor)
Method: (setf acceptor-access-log-destination) NEW-VALUE (ACCEPTOR acceptor)

Destination of the access log
which contains one log entry per request handled in a format similar to Apache’s access.log. Can be set to a pathname or string designating the log file, to a open output stream or to NIL to suppress logging.

Source

acceptor.lisp (file)

Generic Function: acceptor-address OBJECT
Package

hunchentoot

Methods
Method: acceptor-address (ACCEPTOR acceptor)

The address the acceptor is listening on.
If address is a string denoting an IP address, then the server only receives connections for that address. This must be one of the addresses associated with the machine and allowed values are host names such as "www.zappa.com" and address strings such as "72.3.247.29". If address is NIL, then the server will receive connections to all IP addresses on the machine. This is the default.

Source

acceptor.lisp (file)

Generic Function: acceptor-dispatch-request ACCEPTOR REQUEST

This function is called to actually dispatch the
request once the standard logging and error handling has been set up. ACCEPTOR subclasses implement methods for this function in order to perform their own request routing. If a method does not want to handle the request, it is supposed to invoke CALL-NEXT-METHOD so that the next ACCEPTOR in the inheritance chain gets a chance to handle the request.

Package

hunchentoot

Source

acceptor.lisp (file)

Methods
Method: acceptor-dispatch-request (ACCEPTOR easy-acceptor) REQUEST

The easy request dispatcher which selects a request handler based on a list of individual request dispatchers all of which can either return a handler or neglect by returning NIL.

Source

easy-handlers.lisp (file)

Method: acceptor-dispatch-request (ACCEPTOR acceptor) REQUEST

Detault implementation of the request dispatch method, generates an +http-not-found+ error.

Generic Function: acceptor-document-root OBJECT
Generic Function: (setf acceptor-document-root) NEW-VALUE OBJECT
Package

hunchentoot

Methods
Method: acceptor-document-root (ACCEPTOR acceptor)
Method: (setf acceptor-document-root) NEW-VALUE (ACCEPTOR acceptor)

Directory pathname that points to
files that are served by the acceptor if no more specific acceptor-dispatch-request method handles the request.

Source

acceptor.lisp (file)

Generic Function: acceptor-error-template-directory OBJECT
Generic Function: (setf acceptor-error-template-directory) NEW-VALUE OBJECT
Package

hunchentoot

Methods
Method: acceptor-error-template-directory (ACCEPTOR acceptor)
Method: (setf acceptor-error-template-directory) NEW-VALUE (ACCEPTOR acceptor)

Directory pathname that
contains error message template files for server-generated error messages. Files must be named <return-code>.html with <return-code> representing the HTTP return code that the file applies to,
i.e. 404.html would be used as the content for a HTTP 404 Not found response.

Source

acceptor.lisp (file)

Generic Function: acceptor-input-chunking-p OBJECT
Generic Function: (setf acceptor-input-chunking-p) NEW-VALUE OBJECT
Package

hunchentoot

Methods
Method: acceptor-input-chunking-p (ACCEPTOR acceptor)
Method: (setf acceptor-input-chunking-p) NEW-VALUE (ACCEPTOR acceptor)

A generalized boolean denoting
whether the acceptor may use chunked encoding for input, i.e. when accepting request bodies from the client. The default is T and there’s usually no reason to change this to NIL.

Source

acceptor.lisp (file)

Generic Function: acceptor-listen-backlog OBJECT
Package

hunchentoot

Methods
Method: acceptor-listen-backlog (ACCEPTOR acceptor)

Number of pending connections
allowed in the listen socket before the kernel rejects further incoming connections.

Source

acceptor.lisp (file)

Generic Function: acceptor-log-access ACCEPTOR &key RETURN-CODE

Function to call to log access to the acceptor. The RETURN-CODE, CONTENT and CONTENT-LENGTH keyword arguments contain additional information about the request to log. In addition, it can use the standard request accessor functions that are available to handler functions to find out more information about the request.

Package

hunchentoot

Source

acceptor.lisp (file)

Methods
Method: acceptor-log-access (ACCEPTOR acceptor) &key RETURN-CODE

Default method for access logging. It logs the information to the destination determined by (ACCEPTOR-ACCESS-LOG-DESTINATION ACCEPTOR) (unless that value is NIL) in a format that can be parsed by most Apache log analysis tools.)

Generic Function: acceptor-log-message ACCEPTOR LOG-LEVEL FORMAT-STRING &rest FORMAT-ARGUMENTS

Function to call to log messages by the ACCEPTOR. It must accept a severity level for the message, which will be one of :ERROR, :INFO, or :WARNING, a format string and an arbitary number of formatting arguments.

Package

hunchentoot

Source

acceptor.lisp (file)

Methods
Method: acceptor-log-message (ACCEPTOR acceptor) LOG-LEVEL FORMAT-STRING &rest FORMAT-ARGUMENTS

Default function to log server messages. Sends a formatted message to the destination denoted by (ACCEPTOR-MESSAGE-LOG-DESTINATION ACCEPTOR). FORMAT and ARGS are as in FORMAT. LOG-LEVEL is a keyword denoting the log level or NIL in which case it is ignored.

Generic Function: acceptor-message-log-destination OBJECT
Generic Function: (setf acceptor-message-log-destination) NEW-VALUE OBJECT
Package

hunchentoot

Methods
Method: acceptor-message-log-destination (ACCEPTOR acceptor)
Method: (setf acceptor-message-log-destination) NEW-VALUE (ACCEPTOR acceptor)

Destination of the server
error log which is used to log informational, warning and error messages in a free-text format intended for human inspection. Can be set to a pathname or string designating the log file, to a open output stream or to NIL to suppress logging.

Source

acceptor.lisp (file)

Generic Function: acceptor-name OBJECT
Generic Function: (setf acceptor-name) NEW-VALUE OBJECT
Package

hunchentoot

Methods
Method: acceptor-name (ACCEPTOR acceptor)
Method: (setf acceptor-name) NEW-VALUE (ACCEPTOR acceptor)

The optional name of the acceptor, a symbol.
This name can be utilized when defining "easy handlers" - see DEFINE-EASY-HANDLER. The default name is an uninterned symbol as returned by GENSYM.

Source

acceptor.lisp (file)

Generic Function: acceptor-output-chunking-p OBJECT
Generic Function: (setf acceptor-output-chunking-p) NEW-VALUE OBJECT
Package

hunchentoot

Methods
Method: acceptor-output-chunking-p (ACCEPTOR acceptor)
Method: (setf acceptor-output-chunking-p) NEW-VALUE (ACCEPTOR acceptor)

A generalized boolean denoting
whether the acceptor may use chunked encoding for output, i.e. when sending data to the client. The default is T and there’s usually no reason to change this to NIL.

Source

acceptor.lisp (file)

Generic Function: acceptor-persistent-connections-p OBJECT
Generic Function: (setf acceptor-persistent-connections-p) NEW-VALUE OBJECT
Package

hunchentoot

Methods
Method: acceptor-persistent-connections-p (ACCEPTOR acceptor)
Method: (setf acceptor-persistent-connections-p) NEW-VALUE (ACCEPTOR acceptor)

A generalized boolean
denoting whether the acceptor supports persistent connections, which is the default for threaded acceptors. If this property is NIL, Hunchentoot closes each incoming connection after having processed one request. This is the default for non-threaded acceptors.

Source

acceptor.lisp (file)

Generic Function: acceptor-port OBJECT
Package

hunchentoot

Methods
Method: acceptor-port (ACCEPTOR acceptor)

The port the acceptor is listening on. The
default is 80. Note that depending on your operating system you might need special privileges to listen on port 80. When 0, the port will be chosen by the system the first time the acceptor is started.

Source

acceptor.lisp (file)

Generic Function: acceptor-read-timeout OBJECT
Package

hunchentoot

Methods
Method: acceptor-read-timeout (ACCEPTOR acceptor)

The read timeout of the acceptor,
specified in (fractional) seconds. The precise semantics of this parameter is determined by the underlying Lisp’s implementation of socket timeouts. NIL means no timeout.

Source

acceptor.lisp (file)

Generic Function: acceptor-remove-session ACCEPTOR SESSION

This function is called whenever a session in ACCEPTOR is being destroyed because of a session timout or an explicit REMOVE-SESSION call.

Package

hunchentoot

Source

acceptor.lisp (file)

Methods
Method: acceptor-remove-session (ACCEPTOR acceptor) SESSION

Default implementation for the session removal hook function. This function is called whenever a session is destroyed.

Generic Function: acceptor-reply-class OBJECT
Generic Function: (setf acceptor-reply-class) NEW-VALUE OBJECT
Package

hunchentoot

Methods
Method: acceptor-reply-class (ACCEPTOR acceptor)
Method: (setf acceptor-reply-class) NEW-VALUE (ACCEPTOR acceptor)

Determines which class of reply
objects is created when a request is served in and should be (a symbol naming) a class which inherits from REPLY. The default is the symbol REPLY.

Source

acceptor.lisp (file)

Generic Function: acceptor-request-class OBJECT
Generic Function: (setf acceptor-request-class) NEW-VALUE OBJECT
Package

hunchentoot

Methods
Method: acceptor-request-class (ACCEPTOR acceptor)
Method: (setf acceptor-request-class) NEW-VALUE (ACCEPTOR acceptor)

Determines which class of request
objects is created when a request comes in and should be (a symbol naming) a class which inherits from REQUEST. The default is the symbol REQUEST.

Source

acceptor.lisp (file)

Generic Function: acceptor-ssl-certificate-file OBJECT
Package

hunchentoot

Methods
Method: acceptor-ssl-certificate-file (SSL-ACCEPTOR ssl-acceptor)

A pathname designator for a certificate file in PEM format.

Source

ssl.lisp (file)

Generic Function: acceptor-ssl-p ACCEPTOR

Returns a true value if ACCEPTOR uses SSL
connections. The default is to unconditionally return NIL and subclasses of ACCEPTOR must specialize this method to signal that they’re using secure connections - see the SSL-ACCEPTOR class.

Package

hunchentoot

Source

acceptor.lisp (file)

Methods
Method: acceptor-ssl-p (ACCEPTOR ssl-acceptor)
Source

ssl.lisp (file)

Method: acceptor-ssl-p ACCEPTOR
Generic Function: acceptor-ssl-privatekey-file OBJECT
Package

hunchentoot

Methods
Method: acceptor-ssl-privatekey-file (SSL-ACCEPTOR ssl-acceptor)

A pathname designator for a
private key file in PEM format, or (only on LispWorks) NIL if the certificate file contains the private key.

Source

ssl.lisp (file)

Generic Function: acceptor-ssl-privatekey-password OBJECT
Package

hunchentoot

Methods
Method: acceptor-ssl-privatekey-password (SSL-ACCEPTOR ssl-acceptor)

The password for the
private key file or NIL for no password.

Source

ssl.lisp (file)

Generic Function: acceptor-status-message ACCEPTOR HTTP-STATUS-CODE &key &allow-other-keys

This function is called after the request’s handler has been invoked to convert the HTTP-STATUS-CODE to a HTML message to be displayed to the user. If this function returns a string, that string is sent to the client instead of the content produced by the handler, if any.

If an ERROR-TEMPLATE-DIRECTORY is set in the current acceptor and the directory contains a file corresponding to HTTP-STATUS-CODE named <code>.html, that file is sent to the client after variable substitution. Variables are referenced by ${<variable-name>}.

Additional keyword arguments may be provided which are made available to the templating logic as substitution variables. These variables can be interpolated into error message templates in, which contains the current URL relative to the server and without GET parameters.

In addition to the variables corresponding to keyword arguments, the script-name, lisp-implementation-type, lisp-implementation-version and hunchentoot-version variables are available.

Package

hunchentoot

Source

acceptor.lisp (file)

Methods
Method: acceptor-status-message (ACCEPTOR acceptor) HTTP-STATUS-CODE &rest PROPERTIES &key &allow-other-keys

Default function to generate error message sent to the client.

Method: acceptor-status-message (ACCEPTOR acceptor) HTTP-STATUS-CODE &rest ARGS &key &allow-other-keys around
Method: acceptor-status-message ACCEPTOR HTTP-STATUS-CODE &rest ARGS &key &allow-other-keys
Generic Function: acceptor-write-timeout OBJECT
Package

hunchentoot

Methods
Method: acceptor-write-timeout (ACCEPTOR acceptor)

The write timeout of the acceptor,
specified in (fractional) seconds. The precise semantics of this parameter is determined by the underlying Lisp’s implementation of socket timeouts. NIL means no timeout.

Source

acceptor.lisp (file)

Generic Function: content-length OBJECT
Package

hunchentoot

Methods
Method: content-length (REPLY reply)

The outgoing ’Content-Length’
http header which defaults NIL. If this is NIL, Hunchentoot will compute the content length.

Source

reply.lisp (file)

Generic Function: content-type OBJECT
Package

hunchentoot

Methods
Method: content-type (REPLY reply)

The outgoing ’Content-Type’ http
header which defaults to the value of *DEFAULT-CONTENT-TYPE*.

Source

reply.lisp (file)

Generic Function: cookie-domain OBJECT
Generic Function: (setf cookie-domain) NEW-VALUE OBJECT
Package

hunchentoot

Methods
Method: cookie-domain (COOKIE cookie)
Method: (setf cookie-domain) NEW-VALUE (COOKIE cookie)

The domain this cookie is valid for (or NIL).

Source

cookie.lisp (file)

Generic Function: cookie-expires OBJECT
Generic Function: (setf cookie-expires) NEW-VALUE OBJECT
Package

hunchentoot

Methods
Method: cookie-expires (COOKIE cookie)
Method: (setf cookie-expires) NEW-VALUE (COOKIE cookie)

The time (a universal time) when the cookie expires (or NIL).

Source

cookie.lisp (file)

Generic Function: cookie-http-only OBJECT
Generic Function: (setf cookie-http-only) NEW-VALUE OBJECT
Package

hunchentoot

Methods
Method: cookie-http-only (COOKIE cookie)
Method: (setf cookie-http-only) NEW-VALUE (COOKIE cookie)

A generalized boolean denoting whether
this cookie is a ‘HttpOnly’ cookie.

This is a Microsoft extension that has been implemented in Firefox as well. See <http://msdn2.microsoft.com/en-us/library/ms533046.aspx>.

Source

cookie.lisp (file)

Generic Function: cookie-max-age OBJECT
Generic Function: (setf cookie-max-age) NEW-VALUE OBJECT
Package

hunchentoot

Methods
Method: cookie-max-age (COOKIE cookie)
Method: (setf cookie-max-age) NEW-VALUE (COOKIE cookie)

The time delta (in seconds) after which the cookie expires (or NIL).

Source

cookie.lisp (file)

Generic Function: cookie-name OBJECT
Package

hunchentoot

Methods
Method: cookie-name (COOKIE cookie)

The name of the cookie - a string.

Source

cookie.lisp (file)

Generic Function: cookie-path OBJECT
Generic Function: (setf cookie-path) NEW-VALUE OBJECT
Package

hunchentoot

Methods
Method: cookie-path (COOKIE cookie)
Method: (setf cookie-path) NEW-VALUE (COOKIE cookie)

The path this cookie is valid for (or NIL).

Source

cookie.lisp (file)

Generic Function: cookie-secure OBJECT
Generic Function: (setf cookie-secure) NEW-VALUE OBJECT
Package

hunchentoot

Methods
Method: cookie-secure (COOKIE cookie)
Method: (setf cookie-secure) NEW-VALUE (COOKIE cookie)

A generalized boolean denoting whether this cookie is a secure cookie.

Source

cookie.lisp (file)

Generic Function: cookie-value OBJECT
Generic Function: (setf cookie-value) NEW-VALUE OBJECT
Package

hunchentoot

Methods
Method: cookie-value (COOKIE cookie)
Method: (setf cookie-value) NEW-VALUE (COOKIE cookie)

The value of the cookie. Will be URL-encoded when sent to the browser.

Source

cookie.lisp (file)

Generic Function: cookies-in OBJECT
Package

hunchentoot

Methods
Method: cookies-in (REQUEST request)

An alist of the cookies sent by the client.

Source

request.lisp (file)

Generic Function: cookies-out OBJECT
Generic Function: (setf cookies-out) NEW-VALUE OBJECT
Package

hunchentoot

Methods
Method: cookies-out (REPLY reply)
Method: (setf cookies-out) NEW-VALUE (REPLY reply)

The outgoing cookies. This slot’s
value should only be modified by the functions defined in cookies.lisp.

Source

reply.lisp (file)

Generic Function: create-request-handler-thread TASKMASTER SOCKET

Create a new thread in which to process the request.
This thread will call PROCESS-CONNECTION to process the request.

Package

hunchentoot

Source

taskmaster.lisp (file)

Methods
Method: create-request-handler-thread (TASKMASTER one-thread-per-connection-taskmaster) SOCKET

Create a thread for handling a single request

Generic Function: decrement-taskmaster-thread-count TASKMASTER

Atomically decrement the number of taskmaster requests

Package

hunchentoot

Source

taskmaster.lisp (file)

Methods
Method: decrement-taskmaster-thread-count (TASKMASTER one-thread-per-connection-taskmaster)
Method: decrement-taskmaster-thread-count (TASKMASTER taskmaster)

Default method – do nothing.

Generic Function: detach-socket ACCEPTOR

Indicate to Hunchentoot that it should stop serving
requests on the current request’s socket. Hunchentoot will finish processing the current request and then return from PROCESS-CONNECTION without closing the connection to the client. DETACH-SOCKET can only be called from within a request handler function.

Package

hunchentoot

Source

acceptor.lisp (file)

Methods
Method: detach-socket (ACCEPTOR acceptor)
Generic Function: execute-acceptor TASKMASTER

This is a callback called by the acceptor once it
has performed all initial processing to start listening for incoming connections (see START-LISTENING). It usually calls the ACCEPT-CONNECTIONS method of the acceptor, but depending on the taskmaster instance the method might be called from a new thread.

Package

hunchentoot

Source

taskmaster.lisp (file)

Methods
Method: execute-acceptor (TASKMASTER multi-threaded-taskmaster)
Method: execute-acceptor (TASKMASTER single-threaded-taskmaster)
Generic Function: get-parameters OBJECT
Package

hunchentoot

Methods
Method: get-parameters (REQUEST request)

An alist of the GET parameters sent by the client.

Source

request.lisp (file)

Generic Function: handle-incoming-connection TASKMASTER SOCKET

This function is called by the acceptor to start
processing of requests on a new incoming connection. SOCKET is the usocket instance that represents the new connection (or a socket handle on LispWorks). The taskmaster starts processing requests on the incoming connection by calling the PROCESS-CONNECTION method of the acceptor instance. The SOCKET argument is passed to PROCESS-CONNECTION as an argument.

Package

hunchentoot

Source

taskmaster.lisp (file)

Methods
Method: handle-incoming-connection (TASKMASTER one-thread-per-connection-taskmaster) SOCKET
Method: handle-incoming-connection (TASKMASTER single-threaded-taskmaster) SOCKET
Generic Function: handle-request ACCEPTOR REQUEST

This function is called once the request has been
read and a REQUEST object has been created. Its job is to set up standard error handling and request logging.

Might be a good place for around methods specialized for your subclass of ACCEPTOR which bind or rebind special variables which can then be accessed by your handlers.

Package

hunchentoot

Source

acceptor.lisp (file)

Methods
Method: handle-request (*ACCEPTOR* acceptor) (*REQUEST* request)

Standard method for request handling. Calls the request dispatcher of *ACCEPTOR* to determine how the request should be handled. Also sets up standard error handling which catches any errors within the handler.

Generic Function: header-in NAME REQUEST

Returns the incoming header with name NAME. NAME can be a keyword (recommended) or a string.

Package

hunchentoot

Source

request.lisp (file)

Methods
Method: header-in NAME REQUEST
Generic Function: (setf header-out) NEW-VALUE NAME &optional REPLY

Changes the current value of the outgoing http
header named NAME (a keyword or a string). If a header with this name doesn’t exist, it is created.

Package

hunchentoot

Source

reply.lisp (file)

Reader

header-out (function)

Methods
Method: (setf header-out) NEW-VALUE (NAME symbol) &optional REPLY
Method: (setf header-out) NEW-VALUE (NAME string) &optional REPLY

If NAME is a string, it is converted to a keyword first.

Method: (setf header-out) NEW-VALUE (NAME (eql content-length)) &optional REPLY after

Special case for the ‘Content-Length’ header.

Method: (setf header-out) NEW-VALUE (NAME (eql content-type)) &optional REPLY after

Special case for the ‘Content-Type’ header.

Generic Function: headers-in OBJECT
Package

hunchentoot

Methods
Method: headers-in (REQUEST request)

An alist of the incoming headers.

Source

request.lisp (file)

Generic Function: headers-out OBJECT
Package

hunchentoot

Methods
Method: headers-out (REPLY reply)

An alist of the outgoing http headers
not including the ’Set-Cookie’, ’Content-Length’, and ’Content-Type’ headers. Use the functions HEADER-OUT and (SETF HEADER-OUT) to modify this slot.

Source

reply.lisp (file)

Generic Function: increment-taskmaster-thread-count TASKMASTER

Atomically increment the number of taskmaster requests.

Package

hunchentoot

Source

taskmaster.lisp (file)

Methods
Method: increment-taskmaster-thread-count (TASKMASTER one-thread-per-connection-taskmaster)
Method: increment-taskmaster-thread-count (TASKMASTER taskmaster)

Default method – do nothing.

Generic Function: initialize-connection-stream ACCEPTOR STREAM

Can be used to modify the stream which is used to
communicate between client and server before the request is read. The default method of ACCEPTOR does nothing, but see for example the method defined for SSL-ACCEPTOR. All methods of this generic function must return the stream to use.

Package

hunchentoot

Source

acceptor.lisp (file)

Methods
Method: initialize-connection-stream (ACCEPTOR ssl-acceptor) STREAM
Source

ssl.lisp (file)

Method: initialize-connection-stream (ACCEPTOR acceptor) STREAM
Generic Function: local-addr OBJECT
Package

hunchentoot

Methods
Method: local-addr (REQUEST request)

The IP address of the local system that the client connected to.

Source

request.lisp (file)

Generic Function: local-port OBJECT
Package

hunchentoot

Methods
Method: local-port (REQUEST request)

The TCP port number of the local system that the client connected to.

Source

request.lisp (file)

Generic Function: maybe-invoke-debugger CONDITION

This generic function is called whenever a
condition CONDITION is signaled in Hunchentoot. You might want to specialize it on specific condition classes for debugging purposes.

Package

hunchentoot

Source

conditions.lisp (file)

Methods
Method: maybe-invoke-debugger CONDITION

The default method invokes the debugger with CONDITION if *CATCH-ERRORS-P* is NIL.

Generic Function: next-session-id ACCEPTOR

Returns the next sequential session ID, an integer,
which should be unique per session. The default method uses a simple global counter and isn’t guarded by a lock. For a high-performance production environment you might consider using a more robust implementation.

Package

hunchentoot

Source

session.lisp (file)

Methods
Method: next-session-id ACCEPTOR
Generic Function: post-parameters OBJECT
Package

hunchentoot

Methods
Method: post-parameters (REQUEST request) before
Source

request.lisp (file)

Method: post-parameters (REQUEST request)

An alist of the POST parameters sent by the client.

Source

request.lisp (file)

Generic Function: process-connection ACCEPTOR SOCKET

This function is called by the taskmaster when a
new client connection has been established. Its arguments are the ACCEPTOR object and a LispWorks socket handle or a usocket socket stream object in SOCKET. It reads the request headers, sets up the request and reply objects, and hands over to PROCESS-REQUEST. This is done in a loop until the stream has to be closed or until a connection timeout occurs.

It is probably not a good idea to re-implement this method until you really, really know what you’re doing.

Package

hunchentoot

Source

acceptor.lisp (file)

Methods
Method: process-connection (*ACCEPTOR* acceptor) SOCKET
Method: process-connection (*ACCEPTOR* acceptor) SOCKET around
Generic Function: process-request REQUEST

This function is called by PROCESS-CONNECTION after
the incoming headers have been read. It calls HANDLE-REQUEST to select and call a handler and sends the output of this handler to the client using START-OUTPUT. Note that PROCESS-CONNECTION is called once per connection and loops in case of a persistent connection while PROCESS-REQUEST is called anew for each request.

Essentially, you can view process-request as a thin wrapper around HANDLE-REQUEST.

The return value of this function is ignored.

Package

hunchentoot

Source

request.lisp (file)

Methods
Method: process-request REQUEST

Standard implementation for processing a request.

Generic Function: query-string OBJECT
Package

hunchentoot

Methods
Method: query-string (REQUEST request)

The query string of this request.

Source

request.lisp (file)

Generic Function: remote-addr OBJECT
Package

hunchentoot

Methods
Method: remote-addr (REQUEST request)

The IP address of the client that initiated this request.

Source

request.lisp (file)

Generic Function: remote-port OBJECT
Package

hunchentoot

Methods
Method: remote-port (REQUEST request)

The TCP port number of the client socket from which this request originated.

Source

request.lisp (file)

Generic Function: reply-external-format OBJECT
Generic Function: (setf reply-external-format) NEW-VALUE OBJECT
Package

hunchentoot

Methods
Method: reply-external-format (REPLY reply)
Method: (setf reply-external-format) NEW-VALUE (REPLY reply)

The external format of the reply - used for character output.

Source

reply.lisp (file)

Generic Function: request-acceptor OBJECT
Package

hunchentoot

Methods
Method: request-acceptor (REQUEST request)

The acceptor which created this request object.

Source

request.lisp (file)

Generic Function: request-method OBJECT
Package

hunchentoot

Methods
Method: request-method (REQUEST request)

The request method as a keyword.

Source

request.lisp (file)

Generic Function: request-uri OBJECT
Package

hunchentoot

Methods
Method: request-uri (REQUEST request)

The request URI as a string.

Source

request.lisp (file)

Generic Function: reset-connection-stream ACCEPTOR STREAM

Resets the stream which is used to communicate
between client and server after one request has been served so that it can be used to process the next request. This generic function is called after a request has been processed and must return the stream.

Package

hunchentoot

Source

acceptor.lisp (file)

Methods
Method: reset-connection-stream (ACCEPTOR acceptor) STREAM
Generic Function: return-code OBJECT
Generic Function: (setf return-code) NEW-VALUE OBJECT
Package

hunchentoot

Methods
Method: return-code (REPLY reply)
Method: (setf return-code) NEW-VALUE (REPLY reply)

The http return code of this
reply. The return codes Hunchentoot can handle are defined in specials.lisp.

Source

reply.lisp (file)

Generic Function: script-name OBJECT
Package

hunchentoot

Methods
Method: script-name (REQUEST request)

The URI requested by the client without the query string.

Source

request.lisp (file)

Generic Function: server-protocol OBJECT
Package

hunchentoot

Methods
Method: server-protocol (REQUEST request)

The HTTP protocol as a keyword.

Source

request.lisp (file)

Generic Function: session OBJECT
Generic Function: (setf session) NEW-VALUE OBJECT
Package

hunchentoot

Methods
Method: session (REQUEST request)
Method: (setf session) NEW-VALUE (REQUEST request)

The session object associated with this request.

Source

request.lisp (file)

Generic Function: session-cookie-name ACCEPTOR

Returns the name (a string) of the cookie (or the
GET parameter) which is used to store a session on the client side. The default is to use the string "hunchentoot-session", but you can specialize this function if you want another name.

Package

hunchentoot

Source

session.lisp (file)

Methods
Method: session-cookie-name ACCEPTOR
Generic Function: session-cookie-value SESSION

Returns a string which can be used to safely
restore the session SESSION if as session has already been established. This is used as the value stored in the session cookie or in the corresponding GET parameter and verified by SESSION-VERIFY.

A default method is provided and there’s no reason to change it unless you want to use your own session objects.

Package

hunchentoot

Source

session.lisp (file)

Methods
Method: session-cookie-value (SESSION session)
Generic Function: session-created ACCEPTOR NEW-SESSION

This function is called whenever a new session has
been created. There’s a default method which might trigger a session GC based on the value of *SESSION-GC-FREQUENCY*.

The return value is ignored.

Package

hunchentoot

Source

session.lisp (file)

Methods
Method: session-created ACCEPTOR SESSION

Counts session usage globally and triggers session GC if necessary.

Generic Function: session-db ACCEPTOR

Returns the current session database which is an
alist where each car is a session’s ID and the cdr is the corresponding SESSION object itself. The default is to use a global list for all acceptors.

Package

hunchentoot

Source

session.lisp (file)

Writer

(setf session-db) (generic function)

Methods
Method: session-db ACCEPTOR
Generic Function: (setf session-db) NEW-VALUE ACCEPTOR

Modifies the current session database. See SESSION-DB.

Package

hunchentoot

Source

session.lisp (file)

Reader

session-db (generic function)

Methods
Method: (setf session-db) NEW-VALUE ACCEPTOR
Generic Function: session-db-lock ACCEPTOR &key WHOLE-DB-P

A function which returns a lock that will be used
to prevent concurrent access to sessions. The first argument will be the acceptor that handles the current request, the second argument is true if the whole (current) session database is modified. If it is NIL, only one existing session in the database is modified.

This function can return NIL which means that sessions or session databases will be modified without a lock held (for example for single-threaded environments). The default is to always return a global lock (ignoring the ACCEPTOR argument) for Lisps that support threads and NIL otherwise.

Package

hunchentoot

Source

session.lisp (file)

Methods
Method: session-db-lock ACCEPTOR &key WHOLE-DB-P
Generic Function: session-id OBJECT
Package

hunchentoot

Methods
Method: session-id (SESSION session)

The unique ID (an INTEGER) of the session.

Source

session.lisp (file)

Generic Function: session-max-time OBJECT
Generic Function: (setf session-max-time) NEW-VALUE OBJECT
Package

hunchentoot

Methods
Method: session-max-time (SESSION session)
Method: (setf session-max-time) NEW-VALUE (SESSION session)

The time (in seconds) after which this session expires if it’s not used.

Source

session.lisp (file)

Generic Function: session-remote-addr OBJECT
Package

hunchentoot

Methods
Method: session-remote-addr (SESSION session)

The remote IP address of the client
when this session was started as returned by REAL-REMOTE-ADDR.

Source

session.lisp (file)

Generic Function: session-start OBJECT
Package

hunchentoot

Methods
Method: session-start (SESSION session)

The time this session was started.

Source

session.lisp (file)

Generic Function: session-user-agent OBJECT
Package

hunchentoot

Methods
Method: session-user-agent (SESSION session)

The incoming ’User-Agent’ header that was sent when this session was created.

Source

session.lisp (file)

Generic Function: session-verify REQUEST

Tries to get a session identifier from the cookies
(or alternatively from the GET parameters) sent by the client (see SESSION-COOKIE-NAME and SESSION-COOKIE-VALUE). This identifier is then checked for validity against the REQUEST object REQUEST. On success the corresponding session object (if not too old) is returned (and updated). Otherwise NIL is returned.

A default method is provided and you only need to write your own one if you want to maintain your own sessions.

Package

hunchentoot

Source

session.lisp (file)

Methods
Method: session-verify (REQUEST request)
Generic Function: shutdown TASKMASTER

Shuts down the taskmaster, i.e. frees all resources
that were set up by it. For example, a multi-threaded taskmaster might terminate all threads that are currently associated with it. This function is called by the acceptor’s STOP method.

Package

hunchentoot

Source

taskmaster.lisp (file)

Methods
Method: shutdown (TASKMASTER one-thread-per-connection-taskmaster)
Method: shutdown (TASKMASTER taskmaster)
Generic Function: start ACCEPTOR

Starts the ACCEPTOR so that it begins accepting connections. Returns the acceptor.

Package

hunchentoot

Source

acceptor.lisp (file)

Methods
Method: start (ACCEPTOR acceptor)
Generic Function: start-listening ACCEPTOR

Sets up a listen socket for the given ACCEPTOR and
enables it to listen to incoming connections. This function is called from the thread that starts the acceptor initially and may return errors resulting from the listening operation (like ’address in use’ or similar).

Package

hunchentoot

Source

acceptor.lisp (file)

Methods
Method: start-listening (ACCEPTOR acceptor) after
Method: start-listening (ACCEPTOR acceptor)
Generic Function: start-thread TASKMASTER THUNK &key NAME

Start a name thread in which to call the THUNK, in the context of the given TASKMASTER. Keyword arguments provide TASKMASTER-dependent options.
Return a thread object.

Hunchentoot taskmaster methods will call it with the taskmaster as the context, allowing hunchentoot extensions to define specialized methods that may e.g.
wrap the thunk within a proper set of bindings and condition handlers.

Package

hunchentoot

Source

taskmaster.lisp (file)

Methods
Method: start-thread TASKMASTER THUNK &key NAME
Generic Function: started-p ACCEPTOR

Tells if ACCEPTOR has been started.
The default implementation simply queries ACCEPTOR for its listening status, so if T is returned to the calling thread, then some thread has called START or some thread’s call to STOP hasn’t finished. If NIL is returned either some thread has called STOP, or some thread’s call to START hasn’t finished or START was never called at all for ACCEPTOR.

Package

hunchentoot

Source

acceptor.lisp (file)

Methods
Method: started-p ACCEPTOR
Generic Function: stop ACCEPTOR &key SOFT

Stops the ACCEPTOR so that it no longer accepts
requests. If SOFT is true, and there are any requests in progress, wait until all requests are fully processed, but meanwhile do not accept new requests. Note that SOFT must not be set when calling STOP from within a request handler, as that will deadlock.

Package

hunchentoot

Source

acceptor.lisp (file)

Methods
Method: stop (ACCEPTOR acceptor) &key SOFT
Generic Function: taskmaster-acceptor OBJECT
Generic Function: (setf taskmaster-acceptor) NEW-VALUE OBJECT
Package

hunchentoot

Methods
Method: taskmaster-acceptor (TASKMASTER taskmaster)
Method: (setf taskmaster-acceptor) NEW-VALUE (TASKMASTER taskmaster)

A backpointer to the acceptor instance this taskmaster works for.

Source

taskmaster.lisp (file)

Generic Function: taskmaster-max-accept-count TASKMASTER

The maximum number of connections this taskmaster will accept before refusing new connections. If supplied, this must be greater than MAX-THREAD-COUNT. The number of queued requests is the difference between MAX-ACCEPT-COUNT and MAX-THREAD-COUNT.

Package

hunchentoot

Source

taskmaster.lisp (file)

Writer

(setf taskmaster-max-accept-count) (generic function)

Methods
Method: taskmaster-max-accept-count (ONE-THREAD-PER-CONNECTION-TASKMASTER one-thread-per-connection-taskmaster)

The maximum number of connections this taskmaster will accept before refusing new connections. If supplied, this must be greater than MAX-THREAD-COUNT. The number of queued requests is the difference between MAX-ACCEPT-COUNT and MAX-THREAD-COUNT.

Method: taskmaster-max-accept-count (TASKMASTER taskmaster)

Default method – no limit on the number of connections.

Generic Function: (setf taskmaster-max-accept-count) NEW-VALUE OBJECT
Package

hunchentoot

Reader

taskmaster-max-accept-count (generic function)

Methods
Method: (setf taskmaster-max-accept-count) NEW-VALUE (ONE-THREAD-PER-CONNECTION-TASKMASTER one-thread-per-connection-taskmaster)

The maximum number of connections this taskmaster will accept before refusing new connections. If supplied, this must be greater than MAX-THREAD-COUNT. The number of queued requests is the difference between MAX-ACCEPT-COUNT and MAX-THREAD-COUNT.

Source

taskmaster.lisp (file)

Generic Function: taskmaster-max-thread-count TASKMASTER

The maximum number of request threads this taskmaster will simultaneously run before refusing or queueing new connections requests. If the value is null, then there is no limit.

Package

hunchentoot

Source

taskmaster.lisp (file)

Writer

(setf taskmaster-max-thread-count) (generic function)

Methods
Method: taskmaster-max-thread-count (ONE-THREAD-PER-CONNECTION-TASKMASTER one-thread-per-connection-taskmaster)

The maximum number of request threads this taskmaster will simultaneously run before refusing or queueing new connections requests. If the value is null, then there is no limit.

Method: taskmaster-max-thread-count (TASKMASTER taskmaster)

Default method – no limit on the number of threads.

Generic Function: (setf taskmaster-max-thread-count) NEW-VALUE OBJECT
Package

hunchentoot

Reader

taskmaster-max-thread-count (generic function)

Methods
Method: (setf taskmaster-max-thread-count) NEW-VALUE (ONE-THREAD-PER-CONNECTION-TASKMASTER one-thread-per-connection-taskmaster)

The maximum number of request threads this taskmaster will simultaneously run before refusing or queueing new connections requests. If the value is null, then there is no limit.

Source

taskmaster.lisp (file)

Generic Function: taskmaster-thread-count TASKMASTER

Returns the current number of taskmaster requests.

Package

hunchentoot

Source

taskmaster.lisp (file)

Writer

(setf taskmaster-thread-count) (generic function)

Methods
Method: taskmaster-thread-count (ONE-THREAD-PER-CONNECTION-TASKMASTER one-thread-per-connection-taskmaster)

The number of taskmaster processing threads currently running.

Method: taskmaster-thread-count (TASKMASTER taskmaster)

Default method – claim there is one connection thread.

Generic Function: (setf taskmaster-thread-count) NEW-VALUE OBJECT
Package

hunchentoot

Reader

taskmaster-thread-count (generic function)

Methods
Method: (setf taskmaster-thread-count) NEW-VALUE (ONE-THREAD-PER-CONNECTION-TASKMASTER one-thread-per-connection-taskmaster)

The number of taskmaster processing threads currently running.

Source

taskmaster.lisp (file)

Generic Function: too-many-taskmaster-requests TASKMASTER SOCKET

Signal a "too many requests" error, just prior to closing the connection.

Package

hunchentoot

Source

taskmaster.lisp (file)

Methods
Method: too-many-taskmaster-requests (TASKMASTER one-thread-per-connection-taskmaster) SOCKET

Next: , Previous: , Up: Exported definitions   [Contents][Index]

6.1.6 Conditions

Condition: bad-request ()
Package

hunchentoot

Source

conditions.lisp (file)

Direct superclasses

hunchentoot-error (condition)

Condition: hunchentoot-condition ()

Superclass for all conditions related to Hunchentoot.

Package

hunchentoot

Source

conditions.lisp (file)

Direct superclasses

condition (condition)

Direct subclasses
Condition: hunchentoot-error ()

Superclass for all errors related to Hunchentoot.

Package

hunchentoot

Source

conditions.lisp (file)

Direct superclasses
Direct subclasses
Condition: hunchentoot-warning ()

Superclass for all warnings related to Hunchentoot.

Package

hunchentoot

Source

conditions.lisp (file)

Direct superclasses
Direct subclasses

hunchentoot-simple-warning (condition)

Condition: parameter-error ()

Signalled if a function was called with incosistent or illegal parameters.

Package

hunchentoot

Source

conditions.lisp (file)

Direct superclasses

hunchentoot-simple-error (condition)


Previous: , Up: Exported definitions   [Contents][Index]

6.1.7 Classes

Class: acceptor ()

To create a Hunchentoot webserver, you make an
instance of this class and use the generic function START to start it (and STOP to stop it). Use the :PORT initarg if you don’t want to listen on the default http port 80. There are other initargs most of which you probably won’t need very often. They are explained in detail in the docstrings of the slot definitions for this class.

Unless you are in a Lisp without MP capabilities, you can have several active instances of ACCEPTOR (listening on different ports) at the same time.

Package

hunchentoot

Source

acceptor.lisp (file)

Direct superclasses

standard-object (class)

Direct subclasses
Direct methods
Direct slots
Slot: port

The port the acceptor is listening on. The
default is 80. Note that depending on your operating system you might need special privileges to listen on port 80. When 0, the port will be chosen by the system the first time the acceptor is started.

Initargs

:port

Readers

acceptor-port (generic function)

Slot: address

The address the acceptor is listening on.
If address is a string denoting an IP address, then the server only receives connections for that address. This must be one of the addresses associated with the machine and allowed values are host names such as "www.zappa.com" and address strings such as "72.3.247.29". If address is NIL, then the server will receive connections to all IP addresses on the machine. This is the default.

Initargs

:address

Readers

acceptor-address (generic function)

Slot: name

The optional name of the acceptor, a symbol.
This name can be utilized when defining "easy handlers" - see DEFINE-EASY-HANDLER. The default name is an uninterned symbol as returned by GENSYM.

Initargs

:name

Readers

acceptor-name (generic function)

Writers

(setf acceptor-name) (generic function)

Slot: request-class

Determines which class of request
objects is created when a request comes in and should be (a symbol naming) a class which inherits from REQUEST. The default is the symbol REQUEST.

Initargs

:request-class

Readers

acceptor-request-class (generic function)

Writers

(setf acceptor-request-class) (generic function)

Slot: reply-class

Determines which class of reply
objects is created when a request is served in and should be (a symbol naming) a class which inherits from REPLY. The default is the symbol REPLY.

Initargs

:reply-class

Readers

acceptor-reply-class (generic function)

Writers

(setf acceptor-reply-class) (generic function)

Slot: taskmaster

The taskmaster (i.e. an instance of a
subclass of TASKMASTER) that is responsible for scheduling the work for this acceptor. The default depends on the MP capabilities of the underlying Lisp.

Initargs

:taskmaster

Readers

acceptor-taskmaster (generic function)

Slot: output-chunking-p

A generalized boolean denoting
whether the acceptor may use chunked encoding for output, i.e. when sending data to the client. The default is T and there’s usually no reason to change this to NIL.

Initargs

:output-chunking-p

Readers

acceptor-output-chunking-p (generic function)

Writers

(setf acceptor-output-chunking-p) (generic function)

Slot: input-chunking-p

A generalized boolean denoting
whether the acceptor may use chunked encoding for input, i.e. when accepting request bodies from the client. The default is T and there’s usually no reason to change this to NIL.

Initargs

:input-chunking-p

Readers

acceptor-input-chunking-p (generic function)

Writers

(setf acceptor-input-chunking-p) (generic function)

Slot: persistent-connections-p

A generalized boolean
denoting whether the acceptor supports persistent connections, which is the default for threaded acceptors. If this property is NIL, Hunchentoot closes each incoming connection after having processed one request. This is the default for non-threaded acceptors.

Initargs

:persistent-connections-p

Readers

acceptor-persistent-connections-p (generic function)

Writers

(setf acceptor-persistent-connections-p) (generic function)

Slot: read-timeout

The read timeout of the acceptor,
specified in (fractional) seconds. The precise semantics of this parameter is determined by the underlying Lisp’s implementation of socket timeouts. NIL means no timeout.

Initargs

:read-timeout

Readers

acceptor-read-timeout (generic function)

Slot: write-timeout

The write timeout of the acceptor,
specified in (fractional) seconds. The precise semantics of this parameter is determined by the underlying Lisp’s implementation of socket timeouts. NIL means no timeout.

Initargs

:write-timeout

Readers

acceptor-write-timeout (generic function)

Slot: listen-socket

The socket listening for incoming connections.

Readers

acceptor-listen-socket (generic function)

Writers

(setf acceptor-listen-socket) (generic function)

Slot: listen-backlog

Number of pending connections
allowed in the listen socket before the kernel rejects further incoming connections.

Initargs

:listen-backlog

Readers

acceptor-listen-backlog (generic function)

Slot: acceptor-shutdown-p

A flag that makes the acceptor
shutdown itself when set to something other than NIL.

Initform

t

Readers

acceptor-shutdown-p (generic function)

Writers

(setf acceptor-shutdown-p) (generic function)

Slot: requests-in-progress

The number of
requests currently in progress.

Initform

0

Readers

accessor-requests-in-progress (generic function)

Writers

(setf accessor-requests-in-progress) (generic function)

Slot: shutdown-queue

A condition variable
used with soft shutdown, signaled when all requests have been processed.

Initform

(hunchentoot::make-condition-variable)

Readers

acceptor-shutdown-queue (generic function)

Writers

(setf acceptor-shutdown-queue) (generic function)

Slot: shutdown-lock

The lock protecting the shutdown-queue
condition variable and the requests-in-progress counter.

Initform

(hunchentoot::make-lock "hunchentoot-acceptor-shutdown")

Readers

acceptor-shutdown-lock (generic function)

Writers

(setf acceptor-shutdown-lock) (generic function)

Slot: access-log-destination

Destination of the access log
which contains one log entry per request handled in a format similar to Apache’s access.log. Can be set to a pathname or string designating the log file, to a open output stream or to NIL to suppress logging.

Initargs

:access-log-destination

Readers

acceptor-access-log-destination (generic function)

Writers

(setf acceptor-access-log-destination) (generic function)

Slot: message-log-destination

Destination of the server
error log which is used to log informational, warning and error messages in a free-text format intended for human inspection. Can be set to a pathname or string designating the log file, to a open output stream or to NIL to suppress logging.

Initargs

:message-log-destination

Readers

acceptor-message-log-destination (generic function)

Writers

(setf acceptor-message-log-destination) (generic function)

Slot: error-template-directory

Directory pathname that
contains error message template files for server-generated error messages. Files must be named <return-code>.html with <return-code> representing the HTTP return code that the file applies to,
i.e. 404.html would be used as the content for a HTTP 404 Not found response.

Initargs

:error-template-directory

Readers

acceptor-error-template-directory (generic function)

Writers

(setf acceptor-error-template-directory) (generic function)

Slot: document-root

Directory pathname that points to
files that are served by the acceptor if no more specific acceptor-dispatch-request method handles the request.

Initargs

:document-root

Readers

acceptor-document-root (generic function)

Writers

(setf acceptor-document-root) (generic function)

Direct Default Initargs
InitargValue
:addressnil
:port80
:name(gensym)
:request-class(quote hunchentoot:request)
:reply-class(quote hunchentoot:reply)
:listen-backlog50
:taskmaster(make-instance (cond (hunchentoot::*supports-threads-p* (quote hunchentoot:one-thread-per-connection-taskmaster)) (t (quote hunchentoot:single-threaded-taskmaster))))
:output-chunking-pt
:input-chunking-pt
:persistent-connections-pt
:read-timeouthunchentoot:*default-connection-timeout*
:write-timeouthunchentoot:*default-connection-timeout*
:access-log-destination*error-output*
:message-log-destination*error-output*
:document-root(load-time-value (hunchentoot:default-document-directory))
:error-template-directory(load-time-value (hunchentoot:default-document-directory "errors"))
Class: easy-acceptor ()

This is the acceptor of the “easy” Hunchentoot framework.

Package

hunchentoot

Source

easy-handlers.lisp (file)

Direct superclasses

acceptor (class)

Direct subclasses

easy-ssl-acceptor (class)

Direct methods

acceptor-dispatch-request (method)

Class: easy-ssl-acceptor ()

This is an acceptor that mixes the “easy” Hunchentoot with SSL connections.

Package

hunchentoot

Source

easy-handlers.lisp (file)

Direct superclasses
Class: multi-threaded-taskmaster ()

An abstract class for taskmasters that use multiple threads.
For a concrete class to instantiate, use one-thread-per-connection-taskmaster.

Package

hunchentoot

Source

taskmaster.lisp (file)

Direct superclasses

taskmaster (class)

Direct subclasses

one-thread-per-connection-taskmaster (class)

Direct methods
Direct slots
Slot: acceptor-process

A process that accepts incoming connections and hands them off to new processes for request handling.

Readers

acceptor-process (generic function)

Writers

(setf acceptor-process) (generic function)

Class: one-thread-per-connection-taskmaster ()

A taskmaster that starts one thread for listening
to incoming requests and one new thread for each incoming connection.

If MAX-THREAD-COUNT is null, a new thread will always be created for
each request.

If MAX-THREAD-COUNT is supplied, the number of request threads is
limited to that. Furthermore, if MAX-ACCEPT-COUNT is not supplied, an
HTTP 503 will be sent if the thread limit is exceeded. Otherwise, if MAX-ACCEPT-COUNT is supplied, it must be greater than MAX-THREAD-COUNT;
in this case, requests are accepted up to MAX-ACCEPT-COUNT, and only
then is HTTP 503 sent.

It is important to note that MAX-ACCEPT-COUNT and the HTTP 503 behavior described above is racing with the acceptor listen backlog. If we are receiving requests faster than threads can be spawned and 503 sent, the requests will be silently rejected by the kernel.

In a load-balanced environment with multiple Hunchentoot servers, it’s reasonable to provide MAX-THREAD-COUNT but leave MAX-ACCEPT-COUNT null. This will immediately result in HTTP 503 when one server is out of resources, so the load balancer can try to find another server.

In an environment with a single Hunchentoot server, it’s reasonable
to provide both MAX-THREAD-COUNT and a somewhat larger value for MAX-ACCEPT-COUNT. This will cause a server that’s almost out of
resources to wait a bit; if the server is completely out of resources,
then the reply will be HTTP 503.

This is the default taskmaster implementation for multi-threaded Lisp implementations.

Package

hunchentoot

Source

taskmaster.lisp (file)

Direct superclasses

multi-threaded-taskmaster (class)

Direct methods
Direct slots
Slot: max-thread-count

The maximum number of request threads this taskmaster will simultaneously run before refusing or queueing new connections requests. If the value is null, then there is no limit.

Type

(or integer null)

Initargs

:max-thread-count

Readers

taskmaster-max-thread-count (generic function)

Writers

(setf taskmaster-max-thread-count) (generic function)

Slot: thread-count

The number of taskmaster processing threads currently running.

Type

integer

Initform

0

Readers

taskmaster-thread-count (generic function)

Writers

(setf taskmaster-thread-count) (generic function)

Slot: thread-count-lock

In the absence of ’atomic-incf’, we need this to atomically increment and decrement the request count.

Initform

(hunchentoot::make-lock "taskmaster-thread-count")

Readers

taskmaster-thread-count-lock (generic function)

Slot: max-accept-count

The maximum number of connections this taskmaster will accept before refusing new connections. If supplied, this must be greater than MAX-THREAD-COUNT. The number of queued requests is the difference between MAX-ACCEPT-COUNT and MAX-THREAD-COUNT.

Type

(or integer null)

Initargs

:max-accept-count

Readers

taskmaster-max-accept-count (generic function)

Writers

(setf taskmaster-max-accept-count) (generic function)

Slot: accept-count

The number of connection currently accepted by the taskmaster. These connections are not ensured to be processed, thay may be waiting for an empty processing slot or rejected because the load is too heavy.

Type

integer

Initform

0

Readers

taskmaster-accept-count (generic function)

Writers

(setf taskmaster-accept-count) (generic function)

Slot: accept-count-lock

In the absence of ’atomic-incf’, we need this to atomically increment and decrement the accept count.

Initform

(hunchentoot::make-lock "taskmaster-accept-count")

Readers

taskmaster-accept-count-lock (generic function)

Slot: wait-queue

A queue that we use to wait for a free connection.

Initform

(hunchentoot::make-condition-variable)

Readers

taskmaster-wait-queue (generic function)

Slot: wait-lock

The lock for the connection wait queue.

Initform

(hunchentoot::make-lock "taskmaster-thread-lock")

Readers

taskmaster-wait-lock (generic function)

Slot: worker-thread-name-format
Type

(or string null)

Initargs

:worker-thread-name-format

Initform

"hunchentoot-worker-~a"

Readers

taskmaster-worker-thread-name-format (generic function)

Writers

(setf taskmaster-worker-thread-name-format) (generic function)

Direct Default Initargs
InitargValue
:max-thread-counthunchentoot::*default-max-thread-count*
:max-accept-counthunchentoot::*default-max-accept-count*
Class: reply ()

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

You should not mess with the slots of these objects directly, but you can subclass REPLY in order to implement your own behaviour. See the REPLY-CLASS slot of the ACCEPTOR class.

Package

hunchentoot

Source

reply.lisp (file)

Direct superclasses

standard-object (class)

Direct methods
Direct slots
Slot: content-type

The outgoing ’Content-Type’ http
header which defaults to the value of *DEFAULT-CONTENT-TYPE*.

Readers

content-type (generic function)

Slot: content-length

The outgoing ’Content-Length’
http header which defaults NIL. If this is NIL, Hunchentoot will compute the content length.

Readers

content-length (generic function)

Slot: headers-out

An alist of the outgoing http headers
not including the ’Set-Cookie’, ’Content-Length’, and ’Content-Type’ headers. Use the functions HEADER-OUT and (SETF HEADER-OUT) to modify this slot.

Readers

headers-out (generic function)

Slot: return-code

The http return code of this
reply. The return codes Hunchentoot can handle are defined in specials.lisp.

Initform

hunchentoot:+http-ok+

Readers

return-code (generic function)

Writers

(setf return-code) (generic function)

Slot: external-format

The external format of the reply - used for character output.

Initform

hunchentoot:*hunchentoot-default-external-format*

Readers

reply-external-format (generic function)

Writers

(setf reply-external-format) (generic function)

Slot: cookies-out

The outgoing cookies. This slot’s
value should only be modified by the functions defined in cookies.lisp.

Readers

cookies-out (generic function)

Writers

(setf cookies-out) (generic function)

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.

You should not mess with the slots of these objects directly, but you can subclass REQUEST in order to implement your own behaviour. See the REQUEST-CLASS slot of the ACCEPTOR class.

Package

hunchentoot

Source

request.lisp (file)

Direct superclasses

standard-object (class)

Direct methods
Direct slots
Slot: acceptor

The acceptor which created this request object.

Initargs

:acceptor

Readers

request-acceptor (generic function)

Slot: headers-in

An alist of the incoming headers.

Initargs

:headers-in

Readers

headers-in (generic function)

Slot: method

The request method as a keyword.

Initargs

:method

Readers

request-method (generic function)

Slot: uri

The request URI as a string.

Initargs

:uri

Readers

request-uri (generic function)

Slot: server-protocol

The HTTP protocol as a keyword.

Initargs

:server-protocol

Readers

server-protocol (generic function)

Slot: local-addr

The IP address of the local system that the client connected to.

Initargs

:local-addr

Readers

local-addr (generic function)

Slot: local-port

The TCP port number of the local system that the client connected to.

Initargs

:local-port

Readers

local-port (generic function)

Slot: remote-addr

The IP address of the client that initiated this request.

Initargs

:remote-addr

Readers

remote-addr (generic function)

Slot: remote-port

The TCP port number of the client socket from which this request originated.

Initargs

:remote-port

Readers

remote-port (generic function)

Slot: content-stream

A stream from which the request body can be read if there is one.

Initargs

:content-stream

Readers

content-stream (generic function)

Slot: cookies-in

An alist of the cookies sent by the client.

Readers

cookies-in (generic function)

Slot: get-parameters

An alist of the GET parameters sent by the client.

Readers

get-parameters (generic function)

Slot: post-parameters

An alist of the POST parameters sent by the client.

Readers

post-parameters (generic function)

Slot: script-name

The URI requested by the client without the query string.

Readers

script-name (generic function)

Slot: query-string

The query string of this request.

Readers

query-string (generic function)

Slot: session

The session object associated with this request.

Readers

session (generic function)

Writers

(setf session) (generic function)

Slot: aux-data

Used to keep a user-modifiable alist with arbitrary data during the request.

Readers

aux-data (generic function)

Writers

(setf aux-data) (generic function)

Slot: raw-post-data

The raw string sent as the body of a
POST request, populated only if not a multipart/form-data request.

Class: session ()

SESSION objects are automatically maintained by
Hunchentoot. They should not be created explicitly with MAKE-INSTANCE but implicitly with START-SESSION and they should be treated as opaque objects.

You can ignore Hunchentoot’s SESSION objects altogether and implement your own sessions if you provide corresponding methods for SESSION-COOKIE-VALUE and SESSION-VERIFY.

Package

hunchentoot

Source

session.lisp (file)

Direct superclasses

standard-object (class)

Direct methods
Direct slots
Slot: session-id

The unique ID (an INTEGER) of the session.

Type

integer

Initform

(hunchentoot:next-session-id (hunchentoot:request-acceptor hunchentoot:*request*))

Readers

session-id (generic function)

Slot: session-string

The session string encodes enough
data to safely retrieve this session. It is sent to the browser as a cookie value or as a GET parameter.

Readers

session-string (generic function)

Slot: user-agent

The incoming ’User-Agent’ header that was sent when this session was created.

Initform

(hunchentoot:user-agent hunchentoot:*request*)

Readers

session-user-agent (generic function)

Slot: remote-addr

The remote IP address of the client
when this session was started as returned by REAL-REMOTE-ADDR.

Initform

(hunchentoot:real-remote-addr hunchentoot:*request*)

Readers

session-remote-addr (generic function)

Slot: session-start

The time this session was started.

Initform

(get-universal-time)

Readers

session-start (generic function)

Slot: last-click

The last time this session was used.

Initform

(get-universal-time)

Readers

session-last-click (generic function)

Slot: session-data

Data associated with this session - see SESSION-VALUE.

Initargs

:session-data

Readers

session-data (generic function)

Slot: max-time

The time (in seconds) after which this session expires if it’s not used.

Type

fixnum

Initargs

:max-time

Initform

hunchentoot:*session-max-time*

Readers

session-max-time (generic function)

Writers

(setf session-max-time) (generic function)

Class: single-threaded-taskmaster ()

A taskmaster that runs synchronously in the thread
where the START function was invoked (or in the case of LispWorks in the thread started by COMM:START-UP-SERVER). This is the simplest possible taskmaster implementation in that its methods do nothing but calling their acceptor "sister" methods - EXECUTE-ACCEPTOR calls ACCEPT-CONNECTIONS, HANDLE-INCOMING-CONNECTION calls PROCESS-CONNECTION.

Package

hunchentoot

Source

taskmaster.lisp (file)

Direct superclasses

taskmaster (class)

Direct methods
Class: ssl-acceptor ()

Create and START an instance of this class
(instead of ACCEPTOR) if you want an https server. There are two required initargs, :SSL-CERTIFICATE-FILE and :SSL-PRIVATEKEY-FILE, for pathname designators denoting the certificate file and the key file in PEM format. On LispWorks, you can have both in one file in which case the second initarg is optional. You can also use the :SSL-PRIVATEKEY-PASSWORD initarg to provide a password (as a string) for the key file (or NIL, the default, for no password).

The default port for SSL-ACCEPTOR instances is 443 instead of 80

Package

hunchentoot

Source

ssl.lisp (file)

Direct superclasses

acceptor (class)

Direct subclasses

easy-ssl-acceptor (class)

Direct methods
Direct slots
Slot: ssl-certificate-file

A pathname designator for a certificate file in PEM format.

Initargs

:ssl-certificate-file

Readers

acceptor-ssl-certificate-file (generic function)

Slot: ssl-privatekey-file

A pathname designator for a
private key file in PEM format, or (only on LispWorks) NIL if the certificate file contains the private key.

Initargs

:ssl-privatekey-file

Readers

acceptor-ssl-privatekey-file (generic function)

Slot: ssl-privatekey-password

The password for the
private key file or NIL for no password.

Initargs

:ssl-privatekey-password

Readers

acceptor-ssl-privatekey-password (generic function)

Direct Default Initargs
InitargValue
:port443
Class: taskmaster ()

An instance of this class is responsible for
distributing the work of handling requests for its acceptor. This is an "abstract" class in the sense that usually only instances of subclasses of TASKMASTER will be used.

Package

hunchentoot

Source

taskmaster.lisp (file)

Direct superclasses

standard-object (class)

Direct subclasses
Direct methods
Direct slots
Slot: acceptor

A backpointer to the acceptor instance this taskmaster works for.

Readers

taskmaster-acceptor (generic function)

Writers

(setf taskmaster-acceptor) (generic function)


Previous: , Up: Definitions   [Contents][Index]

6.2 Internal definitions


Next: , Previous: , Up: Internal definitions   [Contents][Index]

6.2.1 Constants

Constant: +buffer-length+

Length of buffers used for internal purposes.

Package

hunchentoot

Source

specials.lisp (file)

Constant: +crlf+

A 2-element array consisting of the character codes for a CRLF sequence.

Package

hunchentoot

Source

specials.lisp (file)

Constant: +day-names+

The three-character names of the seven days of the week - needed for cookie date format.

Package

hunchentoot

Source

specials.lisp (file)

Constant: +implementation-link+

A link to the website of the underlying Lisp implementation.

Package

hunchentoot

Source

specials.lisp (file)

Constant: +latin-1+

A FLEXI-STREAMS external format used for ‘faithful’ input and output of binary data.

Package

hunchentoot

Source

specials.lisp (file)

Constant: +month-names+

The three-character names of the twelve months - needed for cookie date format.

Package

hunchentoot

Source

specials.lisp (file)

Constant: +utf-8+

A FLEXI-STREAMS external format used internally for logging and to encode cookie values.

Package

hunchentoot

Source

specials.lisp (file)


Next: , Previous: , Up: Internal definitions   [Contents][Index]

6.2.2 Special variables

Special Variable: *access-log-lock*

A global lock to prevent concurrent access to the log file used by the ACCEPTOR-LOG-ACCESS function.

Package

hunchentoot

Source

specials.lisp (file)

Special Variable: *close-hunchentoot-stream*

This variable is set to NIL during the processing of a handler to tell the acceptor not to close the connection after it is done.

Package

hunchentoot

Source

specials.lisp (file)

Special Variable: *default-max-accept-count*
Package

hunchentoot

Source

taskmaster.lisp (file)

Special Variable: *default-max-thread-count*
Package

hunchentoot

Source

taskmaster.lisp (file)

Special Variable: *easy-handler-alist*

An alist of (URI acceptor-names function) lists defined by DEFINE-EASY-HANDLER.

Package

hunchentoot

Source

easy-handlers.lisp (file)

Special Variable: *find-string-hash*

Hash tables used internally by READ-UNTIL to cache offset arrays.

Package

url-rewrite

Source

specials.lisp (file)

Special Variable: *finish-processing-socket*

Will be set to T if PROCESS-CONNECTION is to stop processing more requests on the current socket connection.

Package

hunchentoot

Source

specials.lisp (file)

Special Variable: *global-session-db-lock*

A global lock to prevent two threads from modifying *session-db* at the same time (or NIL for Lisps which don’t have threads).

Package

hunchentoot

Source

specials.lisp (file)

Special Variable: *headers-sent*

Used internally to check whether the reply headers have already been sent for this request.

Package

hunchentoot

Source

specials.lisp (file)

Special Variable: *http-reason-phrase-map*

Used to map numerical return codes to reason phrases.

Package

hunchentoot

Source

specials.lisp (file)

Special Variable: *hunchentoot-stream*

The stream representing the socket Hunchentoot is listening on.

Package

hunchentoot

Source

specials.lisp (file)

Special Variable: *hyperdoc-base-uri*
Package

url-rewrite

Source

specials.lisp (file)

Special Variable: *hyperdoc-base-uri*
Package

hunchentoot

Source

specials.lisp (file)

Special Variable: *message-log-lock*

A global lock to prevent concurrent access to the log file used by the ACCEPTOR-LOG-MESSAGE function.

Package

hunchentoot

Source

specials.lisp (file)

Special Variable: *mime-type-hash*

A hash table which maps file suffixes to MIME types.

Package

hunchentoot

Source

mime-types.lisp (file)

Special Variable: *mime-type-list*

An alist where the cars are MIME types and the cdrs are list of file suffixes for the corresponding type.

Package

hunchentoot

Source

mime-types.lisp (file)

Special Variable: *session-db*

The default (global) session database.

Package

hunchentoot

Source

specials.lisp (file)

Special Variable: *the-random-state*

A fresh random state.

Package

hunchentoot

Source

specials.lisp (file)

Special Variable: *tmp-files*

A list of temporary files created while a request was handled.

Package

hunchentoot

Source

specials.lisp (file)


Next: , Previous: , Up: Internal definitions   [Contents][Index]

6.2.3 Symbol macros

Symbol Macro: *supports-threads-p*
Package

hunchentoot

Source

specials.lisp (file)

Expansion

bordeaux-threads:*supports-threads-p*


Next: , Previous: , Up: Internal definitions   [Contents][Index]

6.2.4 Macros

Macro: def-http-return-code NAME VALUE REASON-PHRASE

Shortcut to define constants for return codes. NAME is a Lisp symbol, VALUE is the numerical value of the return code, and REASON-PHRASE is the phrase (a string) to be shown in the server’s status line.

Package

hunchentoot

Source

specials.lisp (file)

Macro: defconstant NAME VALUE &optional DOC

Make sure VALUE is evaluated only once (to appease SBCL).

Package

hunchentoot

Source

specials.lisp (file)

Macro: defvar-unbound NAME &optional DOC-STRING

Convenience macro to declare unbound special variables with a documentation string.

Package

hunchentoot

Source

specials.lisp (file)

Macro: handler-case* EXPRESSION &rest CLAUSES

Like HANDLER-CASE, but observes *CATCH-ERRORS-P*.

Package

hunchentoot

Source

conditions.lisp (file)

Macro: ignore-errors* &body BODY

Like IGNORE-ERRORS, but observes *CATCH-ERRORS-P*.

Package

hunchentoot

Source

conditions.lisp (file)

Macro: upgrade-vector VECTOR NEW-TYPE &key CONVERTER

Returns a vector with the same length and the same elements as VECTOR (a variable holding a vector) but having element type NEW-TYPE. If CONVERTER is not NIL, it should designate a function which will be applied to each element of VECTOR before the result is stored in the new vector. The resulting vector will have a fill pointer set to its end.

The macro also uses SETQ to store the new vector in VECTOR.

Package

hunchentoot

Source

util.lisp (file)

Macro: when-let (VAR FORM) &body BODY

Evaluates FORM and binds VAR to the result, then executes BODY if VAR has a true value.

Package

hunchentoot

Source

compat.lisp (file)

Macro: with-acceptor-request-count-incremented (ACCEPTOR) &body BODY

Execute BODY with ACCEPTOR-REQUESTS-IN-PROGRESS of ACCEPTOR incremented by one. If the ACCEPTOR-SHUTDOWN-P returns true after the BODY has been executed, the ACCEPTOR-SHUTDOWN-QUEUE condition variable of the ACCEPTOR is signalled in order to finish shutdown processing.

Package

hunchentoot

Source

acceptor.lisp (file)

Macro: with-conditions-caught-and-logged () &body BODY

Run BODY with conditions caught and logged by the *ACCEPTOR*. Errors are stopped right away so no other part of the software is impacted by them.

Package

hunchentoot

Source

util.lisp (file)

Macro: with-debugger &body BODY

Executes BODY and invokes the debugger if an error is signaled and *CATCH-ERRORS-P* is NIL.

Package

hunchentoot

Source

conditions.lisp (file)

Macro: with-lock-held (LOCK) &body BODY

Simple wrapper to allow LispWorks and Bordeaux Threads to coexist.

Package

hunchentoot

Source

compat.lisp (file)

Macro: with-log-stream (STREAM-VAR DESTINATION LOCK) &body BODY

Helper macro to write log entries. STREAM-VAR is a symbol that will be bound to the logging stream during the execution of BODY. DESTINATION is the logging destination, which can be either a pathname designator of the log file, a symbol designating an open stream or NIL if no logging should be done. LOCK refers to the lock that should be held during the logging operation. If DESTINATION is a pathname, a flexi stream with UTF-8 encoding will be created and bound to STREAM-VAR. If an error occurs while writing to the log file, that error will be logged to *ERROR-OUTPUT*.

Note that logging to a file involves opening and closing the log file for every logging operation, which is overall costly. Web servers with high throughput demands should make use of a specialized logging function rather than relying on Hunchentoot’s default logging facility.

Package

hunchentoot

Source

log.lisp (file)

Macro: with-mapped-conditions () &body BODY

Run BODY with usocket condition mapping in effect, i.e. platform specific network errors will be signalled as usocket conditions. For Lispworks, no mapping is performed.

Package

hunchentoot

Source

util.lisp (file)

Macro: with-rebinding BINDINGS &body BODY

Syntax: WITH-REBINDING ( { var | (var prefix) }* ) form*

Evaluates a series of forms in the lexical environment that is formed by adding the binding of each VAR to a fresh, uninterned symbol, and the binding of that fresh, uninterned symbol to VAR’s original value, i.e., its value in the current lexical environment.

The uninterned symbol is created as if by a call to GENSYM with the string denoted by PREFIX - or, if PREFIX is not supplied, the string denoted by VAR - as argument.

The forms are evaluated in order, and the values of all but the last are discarded (that is, the body is an implicit PROGN).

Package

hunchentoot

Source

compat.lisp (file)

Macro: with-session-lock-held (LOCK) &body BODY

This is like WITH-LOCK-HELD except that it will accept NIL as a "lock" and just execute BODY in this case.

Package

hunchentoot

Source

session.lisp (file)

Macro: with-unique-names (&rest BINDINGS) &body BODY

Syntax: WITH-UNIQUE-NAMES ( { var | (var x) }* ) declaration* form*

Executes a series of forms with each VAR bound to a fresh, uninterned symbol. The uninterned symbol is as if returned by a call to GENSYM with the string denoted by X - or, if X is not supplied, the string denoted by VAR - as argument.

The variable bindings created are lexical unless special declarations are specified. The scopes of the name bindings and declarations do not include the Xs.

The forms are evaluated in order, and the values of all but the last are discarded (that is, the body is an implicit PROGN).

Package

hunchentoot

Source

compat.lisp (file)


Next: , Previous: , Up: Internal definitions   [Contents][Index]

6.2.5 Functions

Function: acceptor-make-request ACCEPTOR SOCKET &key HEADERS-IN CONTENT-STREAM METHOD URI SERVER-PROTOCOL

Make a REQUEST instance for the ACCEPTOR, setting up those slots that are determined from the SOCKET by calling the appropriate socket query functions.

Package

hunchentoot

Source

acceptor.lisp (file)

Function: add-cookie-value-to-url URL &key COOKIE-NAME VALUE REPLACE-AMPERSANDS-P

Removes all GET parameters named COOKIE-NAME from URL and then adds a new GET parameter with the name COOKIE-NAME and the value VALUE. If REPLACE-AMPERSANDS-P is true all literal ampersands in URL are replaced with ’&amp;’. The resulting URL is returned.

Package

hunchentoot

Source

misc.lisp (file)

Function: address-string ()

Returns a string with information about Hunchentoot suitable for inclusion in HTML output.

Package

hunchentoot

Source

util.lisp (file)

Function: comment-start-p ()

Checks whether *STANDARD-OUTPUT* currently ’looks at’ the string "–". Will move the position within the stream by one unless the first characters it sees is not a hyphen.

Package

url-rewrite

Source

primitives.lisp (file)

Function: compute-array-parameter PARAMETER-NAME TYPE PARAMETERS

Retrieves all parameters from PARAMETERS which are named like "PARAMETER-NAME[N]" (where N is a non-negative integer), converts them to TYPE, and returns an array where the Nth element is the corresponding value.

Package

hunchentoot

Source

easy-handlers.lisp (file)

Function: compute-hash-table-parameter PARAMETER-NAME TYPE PARAMETERS KEY-TYPE TEST-FUNCTION

Retrieves all parameters from PARAMETERS which are named like "PARAMETER-NAME{FOO}" (where FOO is any sequence of characters not containing curly brackets), converts them to TYPE, and returns a hash table with test function TEST-FUNCTION where the corresponding value is associated with the key FOO (converted to KEY-TYPE).

Package

hunchentoot

Source

easy-handlers.lisp (file)

Function: compute-list-parameter PARAMETER-NAME TYPE PARAMETERS

Retrieves all parameters from PARAMETERS which are named PARAMETER-NAME, converts them to TYPE, and returns a list of them.

Package

hunchentoot

Source

easy-handlers.lisp (file)

Function: compute-parameter PARAMETER-NAME PARAMETER-TYPE REQUEST-TYPE

Computes and returns the parameter(s) called PARAMETER-NAME and converts it/them according to the value of PARAMETER-TYPE. REQUEST-TYPE is one of :GET, :POST, or :BOTH.

Package

hunchentoot

Source

easy-handlers.lisp (file)

Function: compute-real-name SYMBOL

Computes the ‘real’ paramater name (a string) from the Lisp symbol SYMBOL. Used in cases where no parameter name is provided.

Package

hunchentoot

Source

easy-handlers.lisp (file)

Function: compute-simple-parameter PARAMETER-NAME TYPE PARAMETER-READER

Retrieves the parameter named PARAMETER-NAME using the reader PARAMETER-READER and converts it to TYPE.

Package

hunchentoot

Source

easy-handlers.lisp (file)

Function: condition-variable-signal CONDITION-VARIABLE
Package

hunchentoot

Source

compat.lisp (file)

Function: condition-variable-wait CONDITION-VARIABLE LOCK
Package

hunchentoot

Source

compat.lisp (file)

Function: convert-hack STRING EXTERNAL-FORMAT

The rfc2388 package is buggy in that it operates on a character stream and thus only accepts encodings which are 8 bit transparent. In order to support different encodings for parameter values submitted, we post process whatever string values the rfc2388 package has returned.

Package

hunchentoot

Source

request.lisp (file)

Function: convert-parameter ARGUMENT TYPE

Converts the string ARGUMENT to TYPE where TYPE is one of the symbols STRING, CHARACTERS, INTEGER, KEYWORD, or BOOLEAN - or otherwise a function designator for a function of one argument. ARGUMENT can also be NIL in which case this function also returns NIL unconditionally.

Package

hunchentoot

Source

easy-handlers.lisp (file)

Function: cookie-date UNIVERSAL-TIME

Converts UNIVERSAL-TIME to cookie date format.

Package

hunchentoot

Source

cookie.lisp (file)

Function: cookies-to-alist COOKIES

Converts a list of cookies of the form "key=value" to an alist. No character set processing is done.

Package

hunchentoot

Source

util.lisp (file)

Function: create-random-string &optional N BASE

Returns a random number (as a string) with base BASE and N digits.

Package

hunchentoot

Source

util.lisp (file)

Function: do-with-acceptor-request-count-incremented *ACCEPTOR* FUNCTION
Package

hunchentoot

Source

acceptor.lisp (file)

Function: encode-session-string ID USER-AGENT REMOTE-ADDR START

Creates a uniquely encoded session string based on the values ID, USER-AGENT, REMOTE-ADDR, and START

Package

hunchentoot

Source

session.lisp (file)

Function: ensure-parse-integer STRING &key START END RADIX
Package

hunchentoot

Source

util.lisp (file)

Function: external-format-from-content-type CONTENT-TYPE

Creates and returns an external format corresponding to the value of the content type header provided in CONTENT-TYPE. If the content type was not set or if the character set specified was invalid, NIL is returned.

Package

hunchentoot

Source

request.lisp (file)

Function: form-url-encoded-list-to-alist FORM-URL-ENCODED-LIST &optional EXTERNAL-FORMAT

Converts a list FORM-URL-ENCODED-LIST of name/value pairs into an alist. Both names and values are url-decoded while doing this.

Package

hunchentoot

Source

util.lisp (file)

Function: get-backtrace ()

Returns a string with a backtrace of what the Lisp system thinks is the "current" error.

Package

hunchentoot

Source

conditions.lisp (file)

Function: get-local-address-and-port SOCKET

Returns the local address and port of the socket SOCKET as two values. The address is returned as a string in dotted IP address notation.

Package

hunchentoot

Source

compat.lisp (file)

Function: get-peer-address-and-port SOCKET

Returns the peer address and port of the socket SOCKET as two values. The address is returned as a string in dotted IP address notation.

Package

hunchentoot

Source

compat.lisp (file)

Function: get-post-data &key REQUEST WANT-STREAM ALREADY-READ

Reads the request body from the stream and stores the raw contents (as an array of octets) in the corresponding slot of the REQUEST object. Returns just the stream if WANT-STREAM is true. If there’s a Content-Length header, it is assumed, that ALREADY-READ octets have already been read.

Package

hunchentoot

Source

request.lisp (file)

Function: get-request-data STREAM

Reads incoming headers from the client via STREAM. Returns as multiple values the headers as an alist, the method, the URI, and the protocol of the request.

Package

hunchentoot

Source

headers.lisp (file)

Function: get-stored-session ID

Returns the SESSION object corresponding to the number ID if the session has not expired. Will remove the session if it has expired but will not create a new one.

Package

hunchentoot

Source

session.lisp (file)

Function: header-out-set-p NAME &optional REPLY

Returns a true value if the outgoing http header named NAME has been specified already. NAME should be a keyword or a string.

Package

hunchentoot

Source

reply.lisp (file)

Function: hunchentoot-warn FORMAT-CONTROL &rest FORMAT-ARGUMENTS

Signals a warning of type HUNCHENTOOT-SIMPLE-WARNING with the provided format control and arguments.

Package

hunchentoot

Source

conditions.lisp (file)

Function: hyperdoc-lookup SYMBOL TYPE
Package

url-rewrite

Source

specials.lisp (file)

Function: hyperdoc-lookup SYMBOL TYPE
Package

hunchentoot

Source

specials.lisp (file)

Function: input-chunking-p ()

Whether input chunking is currently switched on for *HUNCHENTOOT-STREAM* - note that this will return NIL if the stream not a chunked stream.

Package

hunchentoot

Source

util.lisp (file)

Function: iso-time &optional TIME

Returns the universal time TIME as a string in full ISO format.

Package

hunchentoot

Source

util.lisp (file)

Function: keep-alive-p REQUEST

Returns a true value unless the incoming request’s headers or the server’s PERSISTENT-CONNECTIONS-P setting obviate a keep-alive reply. The second return value denotes whether the client has explicitly asked for a persistent connection.

Package

hunchentoot

Source

util.lisp (file)

Function: letterp C

Checks whether C is a character between A and Z (case-insensitive).

Package

url-rewrite

Source

primitives.lisp (file)

Function: make-condition-variable &key NAME
Package

hunchentoot

Source

compat.lisp (file)

Function: make-cooked-message HTTP-STATUS-CODE &key ERROR BACKTRACE
Package

hunchentoot

Source

acceptor.lisp (file)

Function: make-defun-parameter DESCRIPTION DEFAULT-PARAMETER-TYPE DEFAULT-REQUEST-TYPE

Creates a keyword parameter to be used by DEFINE-EASY-HANDLER. DESCRIPTION is one of the elements of DEFINE-EASY-HANDLER’s LAMBDA-LIST and DEFAULT-PARAMETER-TYPE and DEFAULT-REQUEST-TYPE are the global default values.

Package

hunchentoot

Source

easy-handlers.lisp (file)

Function: make-lock NAME

Simple wrapper to allow LispWorks and Bordeaux Threads to coexist.

Package

hunchentoot

Source

compat.lisp (file)

Function: make-socket-stream SOCKET ACCEPTOR

Returns a stream for the socket SOCKET. The ACCEPTOR argument is ignored.

Package

hunchentoot

Source

compat.lisp (file)

Function: make-tmp-file-name &optional PREFIX

Generates a unique name for a temporary file. This function is called from the RFC2388 library when a file is uploaded.

Package

hunchentoot

Source

util.lisp (file)

Function: maybe-add-charset-to-content-type-header CONTENT-TYPE EXTERNAL-FORMAT

Given the contents of a CONTENT-TYPE header, add a charset= attribute describing the given EXTERNAL-FORMAT if no charset= attribute is already present and the content type is a text content type. Returns the augmented content type.

Package

hunchentoot

Source

headers.lisp (file)

Function: maybe-handle-range-header FILE

Helper function for handle-static-file. Determines whether the requests specifies a Range header. If so, parses the header and position the already opened file to the location specified. Returns the number of bytes to transfer from the file. Invalid specified ranges are reported to the client with a HTTP 416 status code.

Package

hunchentoot

Source

misc.lisp (file)

Function: maybe-read-post-parameters &key REQUEST FORCE EXTERNAL-FORMAT

Make surce that any POST parameters in the REQUEST are parsed. The body of the request must be either application/x-www-form-urlencoded or multipart/form-data to be considered as containing POST parameters. If FORCE is true, parsing is done unconditionally. Otherwise, parsing will only be done if the RAW-POST-DATA slot in the REQUEST is false. EXTERNAL-FORMAT specifies the external format of the data in the request body. By default, the encoding is determined from the Content-Type header of the request or from *HUNCHENTOOT-DEFAULT-EXTERNAL-FORMAT* if none is found.

Package

hunchentoot

Source

request.lisp (file)

Function: maybe-rewrite-urls-for-session HTML &key COOKIE-NAME VALUE

Rewrites the HTML page HTML such that the name/value pair COOKIE-NAME/COOKIE-VALUE is inserted if the client hasn’t sent a cookie of the same name but only if *REWRITE-FOR-SESSION-URLS* is true. See the docs for URL-REWRITE:REWRITE-URLS.

Package

hunchentoot

Source

misc.lisp (file)

Function: md5-hex STRING

Calculates the md5 sum of the string STRING and returns it as a hex string.

Package

hunchentoot

Source

util.lisp (file)

Function: name-char-p C

Checks whether C is a name constituent character in the sense of HTML.

Package

url-rewrite

Source

primitives.lisp (file)

Function: not-implemented NAME

Used to signal an error if an operation named NAME is not implemented.

Package

hunchentoot

Source

conditions.lisp (file)

Function: parse-content-type CONTENT-TYPE-HEADER

Reads and parses a ‘Content-Type’ header and returns it as three values - the type, the subtype, and the requests’ character set as specified in the ’charset’ parameter in the header, if there is one and if the content type is "text". CONTENT-TYPE-HEADER is supposed to be the corresponding header value as a string.

Package

hunchentoot

Source

util.lisp (file)

Function: parse-multipart-form-data REQUEST EXTERNAL-FORMAT

Parse the REQUEST body as multipart/form-data, assuming that its content type has already been verified. Returns the form data as alist or NIL if there was no data or the data could not be parsed.

Package

hunchentoot

Source

request.lisp (file)

Function: parse-path PATH

Return a relative pathname that has been verified to not contain any directory traversals or explicit device or host fields. Returns NIL if the path is not acceptable.

Package

hunchentoot

Source

request.lisp (file)

Function: parse-rfc2388-form-data STREAM CONTENT-TYPE-HEADER EXTERNAL-FORMAT

Creates an alist of POST parameters from the stream STREAM which is supposed to be of content type ’multipart/form-data’.

Package

hunchentoot

Source

request.lisp (file)

Function: peek-char* ()

PEEK-CHAR with input stream bound to *STANDARD-INPUT* and returning NIL on EOF.

Package

url-rewrite

Source

primitives.lisp (file)

Function: printable-ascii-char-p CHAR
Package

hunchentoot

Source

headers.lisp (file)

Function: quote-string STRING

Quotes string according to RFC 2616’s definition of ‘quoted-string’.

Package

hunchentoot

Source

util.lisp (file)

Function: read-attribute &key SKIP WRITE-THROUGH

Read characters from *STANDARD-INPUT* assuming that they constitue a SGML-style attribute/value pair. Returns three values - the name of the attribute, its value, and the whole string which was read. On EOF the string(s) read so far is/are returned. If SKIP is true NIL is returned. Writes all characters read to *STANDARD-OUTPUT* if WRITE-THROUGH is true.

Package

url-rewrite

Source

util.lisp (file)

Function: read-delimited-string &key SKIP WRITE-THROUGH

Reads and returns as its first value a string from *STANDARD-INPUT*. The string is either delimited by ’ or " in which case the delimiters aren’t part of the string but the second return value is the delimiter character or it is assumed to extend to the next character which is not a name constituent (see NAME-CHAR-P). On EOF the string read so far is returned. If SKIP is true NIL is returned. Writes all characters read to *STANDARD-OUTPUT* if WRITE-THROUGH is true.

Package

url-rewrite

Source

util.lisp (file)

Function: read-initial-request-line STREAM

Reads and returns the initial HTTP request line, catching permitted errors and handling *BREAK-EVEN-WHILE-READING-REQUEST-TYPE-P*. If no request could be read, returns NIL. At this point, both an end-of-file as well as a timeout condition are normal; end-of-file will occur when the client has decided to not send another request but to close the connection instead, a timeout indicates that the connection timeout established by Hunchentoot has expired and we do not want to wait for another request any longer.

Package

hunchentoot

Source

headers.lisp (file)

Function: read-name &key SKIP WRITE-THROUGH

Read characters from *STANDARD-INPUT* as long as they are name constituents. Returns the string which was read unless SKIP is true. On EOF the string read so far is returned. Writes all characters read to *STANDARD-OUTPUT* if WRITE-THROUGH is true.

Package

url-rewrite

Source

util.lisp (file)

Function: read-until STRING &key SKIP WRITE-THROUGH

Reads characters from *STANDARD-INPUT* up to and including STRING. Returns the string which was read (excluding STRING) unless SKIP is true. Writes all characters read to *STANDARD-OUTPUT* if WRITE-THROUGH is true. On EOF the string read so far is returned.

Package

url-rewrite

Source

primitives.lisp (file)

Function: read-while PREDICATE &key SKIP WRITE-THROUGH

Reads characters from *STANDARD-INPUT* while PREDICATE returns a true value for each character. Returns the string which was read unless SKIP is true. Writes all characters read to *STANDARD-OUTPUT* if WRITE-THROUGH is true. On EOF the string read so far is returned.

Package

url-rewrite

Source

primitives.lisp (file)

Function: scanner-for-get-param PARAM-NAME

Returns a CL-PPCRE scanner which matches a GET parameter in a URL. Scanners are memoized in SCANNER-HASH once they are created.

Package

hunchentoot

Source

misc.lisp (file)

Function: send-bad-request-response STREAM &optional ADDITIONAL-INFO

Send a “Bad Request” response to the client.

Package

hunchentoot

Source

headers.lisp (file)

Function: send-response ACCEPTOR STREAM STATUS-CODE &key HEADERS COOKIES CONTENT

Send a HTTP response to the STREAM and log the event in ACCEPTOR. STATUS-CODE is the HTTP status code used in the response. HEADERS and COOKIES are used to create the response header. If CONTENT is provided, it is sent as the response body.

If *HEADER-STREAM* is not NIL, the response headers are written to that stream when they are written to the client.

STREAM is returned.

Package

hunchentoot

Source

headers.lisp (file)

Function: send-service-unavailable-reply TASKMASTER SOCKET

A helper function to send out a quick error reply, before any state is set up via PROCESS-REQUEST.

Package

hunchentoot

Source

taskmaster.lisp (file)

Function: set-timeouts USOCKET READ-TIMEOUT WRITE-TIMEOUT

Sets up timeouts on the given USOCKET object. READ-TIMEOUT is the read timeout period, WRITE-TIMEOUT is the write timeout, specified in (fractional) seconds. The timeouts can either be implemented using the low-level socket options SO_RCVTIMEO and SO_SNDTIMEO or some other, implementation specific mechanism. On platforms that do not support separate read and write timeouts, both must be equal or an error will be signaled. READ-TIMEOUT and WRITE-TIMEOUT may be NIL, which means that the corresponding socket timeout value will not be set.

Package

hunchentoot

Source

set-timeouts.lisp (file)

Function: skip-comment ()

Skip SGML comment from *STANDARD-INPUT*, i.e. a string enclosed in ’–’ on both sides. Returns no values. Writes all characters read to *STANDARD-OUTPUT*. This function assumes (without checking) that the current position of *STANDARD-INPUT* is at the beginning of a comment, after the first hyphen - see COMMENT-START-P.

Package

url-rewrite

Source

util.lisp (file)

Function: skip-whitespace &key SKIP WRITE-THROUGH

Read characters from *STANDARD-INPUT* as long as they are whitespace. Returns the string which was read unless SKIP is true. On EOF the string read so far is returned. Writes all characters read to *STANDARD-OUTPUT* if WRITE-THROUGH is true.

Package

url-rewrite

Source

util.lisp (file)

Function: start-output RETURN-CODE &optional CONTENT

Sends all headers and maybe the content body to *HUNCHENTOOT-STREAM*. Returns immediately and does nothing if called more than once per request. Called by PROCESS-REQUEST and/or SEND-HEADERS. The RETURN-CODE argument represents the integer return code of the request. The corresponding reason phrase is determined by calling the REASON-PHRASE function. The CONTENT provided represents the body data to send to the client, if any. If it is not specified, no body is written to the client. The handler function is expected to directly write to the stream in this case.

Returns the stream that is connected to the client.

Package

hunchentoot

Source

headers.lisp (file)

Function: starts-with-one-of-p SEQ SUBSEQ-LIST &key TEST

Tests whether the sequence SEQ starts with one of the sequences in SUBSEQ-LIST. Individual elements are compared with TEST.

Package

hunchentoot

Source

util.lisp (file)

Function: starts-with-p SEQ SUBSEQ &key TEST

Tests whether the sequence SEQ starts with the sequence SUBSEQ. Individual elements are compared with TEST.

Package

hunchentoot

Source

util.lisp (file)

Function: string-as-keyword STRING

Intern STRING as keyword using the reader so that case conversion is done with the reader defaults.

Package

hunchentoot

Source

acceptor.lisp (file)

Function: stringify-session SESSION

Creates a string representing the SESSION object SESSION. See ENCODE-SESSION-STRING.

Package

hunchentoot

Source

session.lisp (file)

Function: wake-acceptor-for-shutdown ACCEPTOR

Creates a dummy connection to the acceptor, waking ACCEPT-CONNECTIONS while it is waiting. This is supposed to force a check of ACCEPTOR-SHUTDOWN-P.

Package

hunchentoot

Source

acceptor.lisp (file)

Function: whitespacep C

Checks whether C is a whitespace character.

Package

url-rewrite

Source

primitives.lisp (file)


Next: , Previous: , Up: Internal definitions   [Contents][Index]

6.2.6 Generic functions

Generic Function: acceptor-listen-socket OBJECT
Generic Function: (setf acceptor-listen-socket) NEW-VALUE OBJECT
Package

hunchentoot

Methods
Method: acceptor-listen-socket (ACCEPTOR acceptor)
Method: (setf acceptor-listen-socket) NEW-VALUE (ACCEPTOR acceptor)

The socket listening for incoming connections.

Source

acceptor.lisp (file)

Generic Function: acceptor-process OBJECT
Generic Function: (setf acceptor-process) NEW-VALUE OBJECT
Package

hunchentoot

Methods
Method: acceptor-process (MULTI-THREADED-TASKMASTER multi-threaded-taskmaster)
Method: (setf acceptor-process) NEW-VALUE (MULTI-THREADED-TASKMASTER multi-threaded-taskmaster)

A process that accepts incoming connections and hands them off to new processes for request handling.

Source

taskmaster.lisp (file)

Generic Function: acceptor-server-name ACCEPTOR

Returns a string which can be used for ’Server’ headers.

Package

hunchentoot

Source

acceptor.lisp (file)

Methods
Method: acceptor-server-name (ACCEPTOR acceptor)
Generic Function: acceptor-shutdown-lock OBJECT
Generic Function: (setf acceptor-shutdown-lock) NEW-VALUE OBJECT
Package

hunchentoot

Methods
Method: acceptor-shutdown-lock (ACCEPTOR acceptor)
Method: (setf acceptor-shutdown-lock) NEW-VALUE (ACCEPTOR acceptor)

The lock protecting the shutdown-queue
condition variable and the requests-in-progress counter.

Source

acceptor.lisp (file)

Generic Function: acceptor-shutdown-p OBJECT
Generic Function: (setf acceptor-shutdown-p) NEW-VALUE OBJECT
Package

hunchentoot

Methods
Method: acceptor-shutdown-p (ACCEPTOR acceptor)
Method: (setf acceptor-shutdown-p) NEW-VALUE (ACCEPTOR acceptor)

A flag that makes the acceptor
shutdown itself when set to something other than NIL.

Source

acceptor.lisp (file)

Generic Function: acceptor-shutdown-queue OBJECT
Generic Function: (setf acceptor-shutdown-queue) NEW-VALUE OBJECT
Package

hunchentoot

Methods
Method: acceptor-shutdown-queue (ACCEPTOR acceptor)
Method: (setf acceptor-shutdown-queue) NEW-VALUE (ACCEPTOR acceptor)

A condition variable
used with soft shutdown, signaled when all requests have been processed.

Source

acceptor.lisp (file)

Generic Function: acceptor-taskmaster OBJECT
Package

hunchentoot

Methods
Method: acceptor-taskmaster (ACCEPTOR acceptor)

The taskmaster (i.e. an instance of a
subclass of TASKMASTER) that is responsible for scheduling the work for this acceptor. The default depends on the MP capabilities of the underlying Lisp.

Source

acceptor.lisp (file)

Generic Function: accessor-requests-in-progress OBJECT
Generic Function: (setf accessor-requests-in-progress) NEW-VALUE OBJECT
Package

hunchentoot

Methods
Method: accessor-requests-in-progress (ACCEPTOR acceptor)
Method: (setf accessor-requests-in-progress) NEW-VALUE (ACCEPTOR acceptor)

The number of
requests currently in progress.

Source

acceptor.lisp (file)

Generic Function: assoc* THING ALIST

Similar to CL:ASSOC, but ’does the right thing’ if THING is a string or a symbol.

Package

hunchentoot

Source

util.lisp (file)

Methods
Method: assoc* (THING symbol) ALIST
Method: assoc* (THING string) ALIST
Method: assoc* THING ALIST
Generic Function: aux-data OBJECT
Generic Function: (setf aux-data) NEW-VALUE OBJECT
Package

hunchentoot

Methods
Method: aux-data (REQUEST request)
Method: (setf aux-data) NEW-VALUE (REQUEST request)

Used to keep a user-modifiable alist with arbitrary data during the request.

Source

request.lisp (file)

Generic Function: content-stream OBJECT
Package

hunchentoot

Methods
Method: content-stream (REQUEST request)

A stream from which the request body can be read if there is one.

Source

request.lisp (file)

Generic Function: decrement-taskmaster-accept-count TASKMASTER
Package

hunchentoot

Methods
Method: decrement-taskmaster-accept-count (TASKMASTER one-thread-per-connection-taskmaster)
Source

taskmaster.lisp (file)

Generic Function: handle-incoming-connection% TASKMASTER SOCKET
Package

hunchentoot

Methods
Method: handle-incoming-connection% (TASKMASTER one-thread-per-connection-taskmaster) SOCKET
Source

taskmaster.lisp (file)

Generic Function: hunchentoot-operation-not-implemented-operation CONDITION
Package

hunchentoot

Methods
Method: hunchentoot-operation-not-implemented-operation (CONDITION operation-not-implemented)
Source

conditions.lisp (file)

Generic Function: increment-taskmaster-accept-count TASKMASTER
Package

hunchentoot

Methods
Method: increment-taskmaster-accept-count (TASKMASTER one-thread-per-connection-taskmaster)
Source

taskmaster.lisp (file)

Generic Function: note-free-connection TASKMASTER
Package

hunchentoot

Methods
Method: note-free-connection (TASKMASTER one-thread-per-connection-taskmaster)

Note that a connection has been freed up

Source

taskmaster.lisp (file)

Generic Function: session-data OBJECT
Package

hunchentoot

Methods
Method: session-data (SESSION session)

Data associated with this session - see SESSION-VALUE.

Source

session.lisp (file)

Generic Function: session-last-click OBJECT
Package

hunchentoot

Methods
Method: session-last-click (SESSION session)

The last time this session was used.

Source

session.lisp (file)

Generic Function: session-string OBJECT
Package

hunchentoot

Methods
Method: session-string (SESSION session)

The session string encodes enough
data to safely retrieve this session. It is sent to the browser as a cookie value or as a GET parameter.

Source

session.lisp (file)

Generic Function: stringify-cookie COOKIE
Package

hunchentoot

Methods
Method: stringify-cookie (COOKIE cookie)

Converts the COOKIE object COOKIE to a string suitable for a ’Set-Cookie’ header to be sent to the client.

Source

cookie.lisp (file)

Generic Function: taskmaster-accept-count OBJECT
Generic Function: (setf taskmaster-accept-count) NEW-VALUE OBJECT
Package

hunchentoot

Methods
Method: taskmaster-accept-count (ONE-THREAD-PER-CONNECTION-TASKMASTER one-thread-per-connection-taskmaster)
Method: (setf taskmaster-accept-count) NEW-VALUE (ONE-THREAD-PER-CONNECTION-TASKMASTER one-thread-per-connection-taskmaster)

The number of connection currently accepted by the taskmaster. These connections are not ensured to be processed, thay may be waiting for an empty processing slot or rejected because the load is too heavy.

Source

taskmaster.lisp (file)

Generic Function: taskmaster-accept-count-lock OBJECT
Package

hunchentoot

Methods
Method: taskmaster-accept-count-lock (ONE-THREAD-PER-CONNECTION-TASKMASTER one-thread-per-connection-taskmaster)

In the absence of ’atomic-incf’, we need this to atomically increment and decrement the accept count.

Source

taskmaster.lisp (file)

Generic Function: taskmaster-thread-count-lock OBJECT
Package

hunchentoot

Methods
Method: taskmaster-thread-count-lock (ONE-THREAD-PER-CONNECTION-TASKMASTER one-thread-per-connection-taskmaster)

In the absence of ’atomic-incf’, we need this to atomically increment and decrement the request count.

Source

taskmaster.lisp (file)

Generic Function: taskmaster-wait-lock OBJECT
Package

hunchentoot

Methods
Method: taskmaster-wait-lock (ONE-THREAD-PER-CONNECTION-TASKMASTER one-thread-per-connection-taskmaster)

The lock for the connection wait queue.

Source

taskmaster.lisp (file)

Generic Function: taskmaster-wait-queue OBJECT
Package

hunchentoot

Methods
Method: taskmaster-wait-queue (ONE-THREAD-PER-CONNECTION-TASKMASTER one-thread-per-connection-taskmaster)

A queue that we use to wait for a free connection.

Source

taskmaster.lisp (file)

Generic Function: taskmaster-worker-thread-name-format OBJECT
Generic Function: (setf taskmaster-worker-thread-name-format) NEW-VALUE OBJECT
Package

hunchentoot

Methods
Method: taskmaster-worker-thread-name-format (ONE-THREAD-PER-CONNECTION-TASKMASTER one-thread-per-connection-taskmaster)

automatically generated reader method

Source

taskmaster.lisp (file)

Method: (setf taskmaster-worker-thread-name-format) NEW-VALUE (ONE-THREAD-PER-CONNECTION-TASKMASTER one-thread-per-connection-taskmaster)

automatically generated writer method

Source

taskmaster.lisp (file)

Generic Function: wait-for-free-connection TASKMASTER
Package

hunchentoot

Methods
Method: wait-for-free-connection (TASKMASTER one-thread-per-connection-taskmaster)

Wait for a connection to be freed up

Source

taskmaster.lisp (file)

Generic Function: write-header-line KEY VALUE STREAM

Accepts a string KEY and a Lisp object VALUE and writes them directly to the client as an HTTP header line.

Package

hunchentoot

Source

headers.lisp (file)

Methods
Method: write-header-line KEY (STRING string) STREAM
Method: write-header-line KEY (NUMBER number) STREAM
Method: write-header-line KEY VALUE STREAM

Next: , Previous: , Up: Internal definitions   [Contents][Index]

6.2.7 Conditions

Condition: hunchentoot-simple-error ()

Like HUNCHENTOOT-ERROR but with formatting capabilities.

Package

hunchentoot

Source

conditions.lisp (file)

Direct superclasses
Direct subclasses

parameter-error (condition)

Condition: hunchentoot-simple-warning ()

Like HUNCHENTOOT-WARNING but with formatting capabilities.

Package

hunchentoot

Source

conditions.lisp (file)

Direct superclasses
Condition: operation-not-implemented ()

This warning is signalled when an operation (like SETUID for example) is not implemented for a specific Lisp.

Package

hunchentoot

Source

conditions.lisp (file)

Direct superclasses

hunchentoot-error (condition)

Direct methods

hunchentoot-operation-not-implemented-operation (method)

Direct slots
Slot: operation

The name of the unimplemented operation.

Initargs

:operation

Readers

hunchentoot-operation-not-implemented-operation (generic function)


Previous: , Up: Internal definitions   [Contents][Index]

6.2.8 Classes

Class: cookie ()

Each COOKIE objects describes one outgoing cookie.

Package

hunchentoot

Source

cookie.lisp (file)

Direct superclasses

standard-object (class)

Direct methods
Direct slots
Slot: name

The name of the cookie - a string.

Type

string

Initargs

:name

Readers

cookie-name (generic function)

Slot: value

The value of the cookie. Will be URL-encoded when sent to the browser.

Initargs

:value

Initform

""

Readers

cookie-value (generic function)

Writers

(setf cookie-value) (generic function)

Slot: expires

The time (a universal time) when the cookie expires (or NIL).

Initargs

:expires

Readers

cookie-expires (generic function)

Writers

(setf cookie-expires) (generic function)

Slot: max-age

The time delta (in seconds) after which the cookie expires (or NIL).

Initargs

:max-age

Readers

cookie-max-age (generic function)

Writers

(setf cookie-max-age) (generic function)

Slot: path

The path this cookie is valid for (or NIL).

Initargs

:path

Readers

cookie-path (generic function)

Writers

(setf cookie-path) (generic function)

Slot: domain

The domain this cookie is valid for (or NIL).

Initargs

:domain

Readers

cookie-domain (generic function)

Writers

(setf cookie-domain) (generic function)

Slot: secure

A generalized boolean denoting whether this cookie is a secure cookie.

Initargs

:secure

Readers

cookie-secure (generic function)

Writers

(setf cookie-secure) (generic function)

Slot: http-only

A generalized boolean denoting whether
this cookie is a ‘HttpOnly’ cookie.

This is a Microsoft extension that has been implemented in Firefox as well. See <http://msdn2.microsoft.com/en-us/library/ms533046.aspx>.

Initargs

:http-only

Readers

cookie-http-only (generic function)

Writers

(setf cookie-http-only) (generic function)


Previous: , Up: Top   [Contents][Index]

Appendix A Indexes


Next: , Previous: , Up: Indexes   [Contents][Index]

A.1 Concepts

Jump to:   F   H   L   M  
Index Entry  Section

F
File, Lisp, hunchentoot.asd: The hunchentoot<dot>asd file
File, Lisp, hunchentoot/acceptor.lisp: The hunchentoot/acceptor<dot>lisp file
File, Lisp, hunchentoot/compat.lisp: The hunchentoot/compat<dot>lisp file
File, Lisp, hunchentoot/conditions.lisp: The hunchentoot/conditions<dot>lisp file
File, Lisp, hunchentoot/cookie.lisp: The hunchentoot/cookie<dot>lisp file
File, Lisp, hunchentoot/easy-handlers.lisp: The hunchentoot/easy-handlers<dot>lisp file
File, Lisp, hunchentoot/headers.lisp: The hunchentoot/headers<dot>lisp file
File, Lisp, hunchentoot/log.lisp: The hunchentoot/log<dot>lisp file
File, Lisp, hunchentoot/mime-types.lisp: The hunchentoot/mime-types<dot>lisp file
File, Lisp, hunchentoot/misc.lisp: The hunchentoot/misc<dot>lisp file
File, Lisp, hunchentoot/packages.lisp: The hunchentoot/packages<dot>lisp file
File, Lisp, hunchentoot/reply.lisp: The hunchentoot/reply<dot>lisp file
File, Lisp, hunchentoot/request.lisp: The hunchentoot/request<dot>lisp file
File, Lisp, hunchentoot/session.lisp: The hunchentoot/session<dot>lisp file
File, Lisp, hunchentoot/set-timeouts.lisp: The hunchentoot/set-timeouts<dot>lisp file
File, Lisp, hunchentoot/specials.lisp: The hunchentoot/specials<dot>lisp file
File, Lisp, hunchentoot/ssl.lisp: The hunchentoot/ssl<dot>lisp file
File, Lisp, hunchentoot/taskmaster.lisp: The hunchentoot/taskmaster<dot>lisp file
File, Lisp, hunchentoot/url-rewrite/packages.lisp: The hunchentoot/url-rewrite/packages<dot>lisp file
File, Lisp, hunchentoot/url-rewrite/primitives.lisp: The hunchentoot/url-rewrite/primitives<dot>lisp file
File, Lisp, hunchentoot/url-rewrite/specials.lisp: The hunchentoot/url-rewrite/specials<dot>lisp file
File, Lisp, hunchentoot/url-rewrite/url-rewrite.lisp: The hunchentoot/url-rewrite/url-rewrite<dot>lisp file
File, Lisp, hunchentoot/url-rewrite/util.lisp: The hunchentoot/url-rewrite/util<dot>lisp file
File, Lisp, hunchentoot/util.lisp: The hunchentoot/util<dot>lisp file

H
hunchentoot.asd: The hunchentoot<dot>asd file
hunchentoot/acceptor.lisp: The hunchentoot/acceptor<dot>lisp file
hunchentoot/compat.lisp: The hunchentoot/compat<dot>lisp file
hunchentoot/conditions.lisp: The hunchentoot/conditions<dot>lisp file
hunchentoot/cookie.lisp: The hunchentoot/cookie<dot>lisp file
hunchentoot/easy-handlers.lisp: The hunchentoot/easy-handlers<dot>lisp file
hunchentoot/headers.lisp: The hunchentoot/headers<dot>lisp file
hunchentoot/log.lisp: The hunchentoot/log<dot>lisp file
hunchentoot/mime-types.lisp: The hunchentoot/mime-types<dot>lisp file
hunchentoot/misc.lisp: The hunchentoot/misc<dot>lisp file
hunchentoot/packages.lisp: The hunchentoot/packages<dot>lisp file
hunchentoot/reply.lisp: The hunchentoot/reply<dot>lisp file
hunchentoot/request.lisp: The hunchentoot/request<dot>lisp file
hunchentoot/session.lisp: The hunchentoot/session<dot>lisp file
hunchentoot/set-timeouts.lisp: The hunchentoot/set-timeouts<dot>lisp file
hunchentoot/specials.lisp: The hunchentoot/specials<dot>lisp file
hunchentoot/ssl.lisp: The hunchentoot/ssl<dot>lisp file
hunchentoot/taskmaster.lisp: The hunchentoot/taskmaster<dot>lisp file
hunchentoot/url-rewrite: The hunchentoot/url-rewrite module
hunchentoot/url-rewrite/packages.lisp: The hunchentoot/url-rewrite/packages<dot>lisp file
hunchentoot/url-rewrite/primitives.lisp: The hunchentoot/url-rewrite/primitives<dot>lisp file
hunchentoot/url-rewrite/specials.lisp: The hunchentoot/url-rewrite/specials<dot>lisp file
hunchentoot/url-rewrite/url-rewrite.lisp: The hunchentoot/url-rewrite/url-rewrite<dot>lisp file
hunchentoot/url-rewrite/util.lisp: The hunchentoot/url-rewrite/util<dot>lisp file
hunchentoot/util.lisp: The hunchentoot/util<dot>lisp file

L
Lisp File, hunchentoot.asd: The hunchentoot<dot>asd file
Lisp File, hunchentoot/acceptor.lisp: The hunchentoot/acceptor<dot>lisp file
Lisp File, hunchentoot/compat.lisp: The hunchentoot/compat<dot>lisp file
Lisp File, hunchentoot/conditions.lisp: The hunchentoot/conditions<dot>lisp file
Lisp File, hunchentoot/cookie.lisp: The hunchentoot/cookie<dot>lisp file
Lisp File, hunchentoot/easy-handlers.lisp: The hunchentoot/easy-handlers<dot>lisp file
Lisp File, hunchentoot/headers.lisp: The hunchentoot/headers<dot>lisp file
Lisp File, hunchentoot/log.lisp: The hunchentoot/log<dot>lisp file
Lisp File, hunchentoot/mime-types.lisp: The hunchentoot/mime-types<dot>lisp file
Lisp File, hunchentoot/misc.lisp: The hunchentoot/misc<dot>lisp file
Lisp File, hunchentoot/packages.lisp: The hunchentoot/packages<dot>lisp file
Lisp File, hunchentoot/reply.lisp: The hunchentoot/reply<dot>lisp file
Lisp File, hunchentoot/request.lisp: The hunchentoot/request<dot>lisp file
Lisp File, hunchentoot/session.lisp: The hunchentoot/session<dot>lisp file
Lisp File, hunchentoot/set-timeouts.lisp: The hunchentoot/set-timeouts<dot>lisp file
Lisp File, hunchentoot/specials.lisp: The hunchentoot/specials<dot>lisp file
Lisp File, hunchentoot/ssl.lisp: The hunchentoot/ssl<dot>lisp file
Lisp File, hunchentoot/taskmaster.lisp: The hunchentoot/taskmaster<dot>lisp file
Lisp File, hunchentoot/url-rewrite/packages.lisp: The hunchentoot/url-rewrite/packages<dot>lisp file
Lisp File, hunchentoot/url-rewrite/primitives.lisp: The hunchentoot/url-rewrite/primitives<dot>lisp file
Lisp File, hunchentoot/url-rewrite/specials.lisp: The hunchentoot/url-rewrite/specials<dot>lisp file
Lisp File, hunchentoot/url-rewrite/url-rewrite.lisp: The hunchentoot/url-rewrite/url-rewrite<dot>lisp file
Lisp File, hunchentoot/url-rewrite/util.lisp: The hunchentoot/url-rewrite/util<dot>lisp file
Lisp File, hunchentoot/util.lisp: The hunchentoot/util<dot>lisp file

M
Module, hunchentoot/url-rewrite: The hunchentoot/url-rewrite module

Jump to:   F   H   L   M  

Next: , Previous: , Up: Indexes   [Contents][Index]

A.2 Functions

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

(
(setf acceptor-access-log-destination): Exported generic functions
(setf acceptor-access-log-destination): Exported generic functions
(setf acceptor-document-root): Exported generic functions
(setf acceptor-document-root): Exported generic functions
(setf acceptor-error-template-directory): Exported generic functions
(setf acceptor-error-template-directory): Exported generic functions
(setf acceptor-input-chunking-p): Exported generic functions
(setf acceptor-input-chunking-p): Exported generic functions
(setf acceptor-listen-socket): Internal generic functions
(setf acceptor-listen-socket): Internal generic functions
(setf acceptor-message-log-destination): Exported generic functions
(setf acceptor-message-log-destination): Exported generic functions
(setf acceptor-name): Exported generic functions
(setf acceptor-name): Exported generic functions
(setf acceptor-output-chunking-p): Exported generic functions
(setf acceptor-output-chunking-p): Exported generic functions
(setf acceptor-persistent-connections-p): Exported generic functions
(setf acceptor-persistent-connections-p): Exported generic functions
(setf acceptor-process): Internal generic functions
(setf acceptor-process): Internal generic functions
(setf acceptor-reply-class): Exported generic functions
(setf acceptor-reply-class): Exported generic functions
(setf acceptor-request-class): Exported generic functions
(setf acceptor-request-class): Exported generic functions
(setf acceptor-shutdown-lock): Internal generic functions
(setf acceptor-shutdown-lock): Internal generic functions
(setf acceptor-shutdown-p): Internal generic functions
(setf acceptor-shutdown-p): Internal generic functions
(setf acceptor-shutdown-queue): Internal generic functions
(setf acceptor-shutdown-queue): Internal generic functions
(setf accessor-requests-in-progress): Internal generic functions
(setf accessor-requests-in-progress): Internal generic functions
(setf aux-data): Internal generic functions
(setf aux-data): Internal generic functions
(setf aux-request-value): Exported functions
(setf content-length*): Exported functions
(setf content-type*): Exported functions
(setf cookie-domain): Exported generic functions
(setf cookie-domain): Exported generic functions
(setf cookie-expires): Exported generic functions
(setf cookie-expires): Exported generic functions
(setf cookie-http-only): Exported generic functions
(setf cookie-http-only): Exported generic functions
(setf cookie-max-age): Exported generic functions
(setf cookie-max-age): Exported generic functions
(setf cookie-path): Exported generic functions
(setf cookie-path): Exported generic functions
(setf cookie-secure): Exported generic functions
(setf cookie-secure): Exported generic functions
(setf cookie-value): Exported generic functions
(setf cookie-value): Exported generic functions
(setf cookies-out): Exported generic functions
(setf cookies-out): Exported generic functions
(setf cookies-out*): Exported functions
(setf header-out): Exported generic functions
(setf header-out): Exported generic functions
(setf header-out): Exported generic functions
(setf header-out): Exported generic functions
(setf header-out): Exported generic functions
(setf reply-external-format): Exported generic functions
(setf reply-external-format): Exported generic functions
(setf reply-external-format*): Exported functions
(setf return-code): Exported generic functions
(setf return-code): Exported generic functions
(setf return-code*): Exported functions
(setf session): Exported generic functions
(setf session): Exported generic functions
(setf session-db): Exported generic functions
(setf session-db): Exported generic functions
(setf session-max-time): Exported generic functions
(setf session-max-time): Exported generic functions
(setf session-value): Exported functions
(setf taskmaster-accept-count): Internal generic functions
(setf taskmaster-accept-count): Internal generic functions
(setf taskmaster-acceptor): Exported generic functions
(setf taskmaster-acceptor): Exported generic functions
(setf taskmaster-max-accept-count): Exported generic functions
(setf taskmaster-max-accept-count): Exported generic functions
(setf taskmaster-max-thread-count): Exported generic functions
(setf taskmaster-max-thread-count): Exported generic functions
(setf taskmaster-thread-count): Exported generic functions
(setf taskmaster-thread-count): Exported generic functions
(setf taskmaster-worker-thread-name-format): Internal generic functions
(setf taskmaster-worker-thread-name-format): Internal generic functions

A
abort-request-handler: Exported functions
accept-connections: Exported generic functions
accept-connections: Exported generic functions
acceptor-access-log-destination: Exported generic functions
acceptor-access-log-destination: Exported generic functions
acceptor-address: Exported generic functions
acceptor-address: Exported generic functions
acceptor-dispatch-request: Exported generic functions
acceptor-dispatch-request: Exported generic functions
acceptor-dispatch-request: Exported generic functions
acceptor-document-root: Exported generic functions
acceptor-document-root: Exported generic functions
acceptor-error-template-directory: Exported generic functions
acceptor-error-template-directory: Exported generic functions
acceptor-input-chunking-p: Exported generic functions
acceptor-input-chunking-p: Exported generic functions
acceptor-listen-backlog: Exported generic functions
acceptor-listen-backlog: Exported generic functions
acceptor-listen-socket: Internal generic functions
acceptor-listen-socket: Internal generic functions
acceptor-log-access: Exported generic functions
acceptor-log-access: Exported generic functions
acceptor-log-message: Exported generic functions
acceptor-log-message: Exported generic functions
acceptor-make-request: Internal functions
acceptor-message-log-destination: Exported generic functions
acceptor-message-log-destination: Exported generic functions
acceptor-name: Exported generic functions
acceptor-name: Exported generic functions
acceptor-output-chunking-p: Exported generic functions
acceptor-output-chunking-p: Exported generic functions
acceptor-persistent-connections-p: Exported generic functions
acceptor-persistent-connections-p: Exported generic functions
acceptor-port: Exported generic functions
acceptor-port: Exported generic functions
acceptor-process: Internal generic functions
acceptor-process: Internal generic functions
acceptor-read-timeout: Exported generic functions
acceptor-read-timeout: Exported generic functions
acceptor-remove-session: Exported generic functions
acceptor-remove-session: Exported generic functions
acceptor-reply-class: Exported generic functions
acceptor-reply-class: Exported generic functions
acceptor-request-class: Exported generic functions
acceptor-request-class: Exported generic functions
acceptor-server-name: Internal generic functions
acceptor-server-name: Internal generic functions
acceptor-shutdown-lock: Internal generic functions
acceptor-shutdown-lock: Internal generic functions
acceptor-shutdown-p: Internal generic functions
acceptor-shutdown-p: Internal generic functions
acceptor-shutdown-queue: Internal generic functions
acceptor-shutdown-queue: Internal generic functions
acceptor-ssl-certificate-file: Exported generic functions
acceptor-ssl-certificate-file: Exported generic functions
acceptor-ssl-p: Exported generic functions
acceptor-ssl-p: Exported generic functions
acceptor-ssl-p: Exported generic functions
acceptor-ssl-privatekey-file: Exported generic functions
acceptor-ssl-privatekey-file: Exported generic functions
acceptor-ssl-privatekey-password: Exported generic functions
acceptor-ssl-privatekey-password: Exported generic functions
acceptor-status-message: Exported generic functions
acceptor-status-message: Exported generic functions
acceptor-status-message: Exported generic functions
acceptor-status-message: Exported generic functions
acceptor-taskmaster: Internal generic functions
acceptor-taskmaster: Internal generic functions
acceptor-write-timeout: Exported generic functions
acceptor-write-timeout: Exported generic functions
accessor-requests-in-progress: Internal generic functions
accessor-requests-in-progress: Internal generic functions
add-cookie-value-to-url: Internal functions
add-get-param-to-url: Exported functions
address-string: Internal functions
assoc*: Internal generic functions
assoc*: Internal generic functions
assoc*: Internal generic functions
assoc*: Internal generic functions
authorization: Exported functions
aux-data: Internal generic functions
aux-data: Internal generic functions
aux-request-value: Exported functions

C
client-as-string: Exported functions
comment-start-p: Internal functions
compute-array-parameter: Internal functions
compute-hash-table-parameter: Internal functions
compute-list-parameter: Internal functions
compute-parameter: Internal functions
compute-real-name: Internal functions
compute-simple-parameter: Internal functions
condition-variable-signal: Internal functions
condition-variable-wait: Internal functions
content-length: Exported generic functions
content-length: Exported generic functions
content-length*: Exported functions
content-stream: Internal generic functions
content-stream: Internal generic functions
content-type: Exported generic functions
content-type: Exported generic functions
content-type*: Exported functions
convert-hack: Internal functions
convert-parameter: Internal functions
cookie-date: Internal functions
cookie-domain: Exported generic functions
cookie-domain: Exported generic functions
cookie-expires: Exported generic functions
cookie-expires: Exported generic functions
cookie-http-only: Exported generic functions
cookie-http-only: Exported generic functions
cookie-in: Exported functions
cookie-max-age: Exported generic functions
cookie-max-age: Exported generic functions
cookie-name: Exported generic functions
cookie-name: Exported generic functions
cookie-out: Exported functions
cookie-path: Exported generic functions
cookie-path: Exported generic functions
cookie-secure: Exported generic functions
cookie-secure: Exported generic functions
cookie-value: Exported generic functions
cookie-value: Exported generic functions
cookies-in: Exported generic functions
cookies-in: Exported generic functions
cookies-in*: Exported functions
cookies-out: Exported generic functions
cookies-out: Exported generic functions
cookies-out*: Exported functions
cookies-to-alist: Internal functions
create-folder-dispatcher-and-handler: Exported functions
create-prefix-dispatcher: Exported functions
create-random-string: Internal functions
create-regex-dispatcher: Exported functions
create-request-handler-thread: Exported generic functions
create-request-handler-thread: Exported generic functions
create-static-file-dispatcher-and-handler: Exported functions

D
decrement-taskmaster-accept-count: Internal generic functions
decrement-taskmaster-accept-count: Internal generic functions
decrement-taskmaster-thread-count: Exported generic functions
decrement-taskmaster-thread-count: Exported generic functions
decrement-taskmaster-thread-count: Exported generic functions
def-http-return-code: Internal macros
default-document-directory: Exported functions
defconstant: Internal macros
define-easy-handler: Exported macros
defvar-unbound: Internal macros
delete-aux-request-value: Exported functions
delete-session-value: Exported functions
detach-socket: Exported generic functions
detach-socket: Exported generic functions
dispatch-easy-handlers: Exported functions
do-with-acceptor-request-count-incremented: Internal functions

E
encode-session-string: Internal functions
ensure-parse-integer: Internal functions
escape-for-html: Exported functions
execute-acceptor: Exported generic functions
execute-acceptor: Exported generic functions
execute-acceptor: Exported generic functions
external-format-from-content-type: Internal functions

F
form-url-encoded-list-to-alist: Internal functions
Function, (setf content-length*): Exported functions
Function, (setf content-type*): Exported functions
Function, (setf cookies-out*): Exported functions
Function, (setf reply-external-format*): Exported functions
Function, (setf return-code*): Exported functions
Function, abort-request-handler: Exported functions
Function, acceptor-make-request: Internal functions
Function, add-cookie-value-to-url: Internal functions
Function, add-get-param-to-url: Exported functions
Function, address-string: Internal functions
Function, authorization: Exported functions
Function, aux-request-value: Exported functions
Function, client-as-string: Exported functions
Function, comment-start-p: Internal functions
Function, compute-array-parameter: Internal functions
Function, compute-hash-table-parameter: Internal functions
Function, compute-list-parameter: Internal functions
Function, compute-parameter: Internal functions
Function, compute-real-name: Internal functions
Function, compute-simple-parameter: Internal functions
Function, condition-variable-signal: Internal functions
Function, condition-variable-wait: Internal functions
Function, content-length*: Exported functions
Function, content-type*: Exported functions
Function, convert-hack: Internal functions
Function, convert-parameter: Internal functions
Function, cookie-date: Internal functions
Function, cookie-in: Exported functions
Function, cookie-out: Exported functions
Function, cookies-in*: Exported functions
Function, cookies-out*: Exported functions
Function, cookies-to-alist: Internal functions
Function, create-folder-dispatcher-and-handler: Exported functions
Function, create-prefix-dispatcher: Exported functions
Function, create-random-string: Internal functions
Function, create-regex-dispatcher: Exported functions
Function, create-static-file-dispatcher-and-handler: Exported functions
Function, default-document-directory: Exported functions
Function, delete-aux-request-value: Exported functions
Function, delete-session-value: Exported functions
Function, dispatch-easy-handlers: Exported functions
Function, do-with-acceptor-request-count-incremented: Internal functions
Function, encode-session-string: Internal functions
Function, ensure-parse-integer: Internal functions
Function, escape-for-html: Exported functions
Function, external-format-from-content-type: Internal functions
Function, form-url-encoded-list-to-alist: Internal functions
Function, get-backtrace: Internal functions
Function, get-local-address-and-port: Internal functions
Function, get-parameter: Exported functions
Function, get-parameters*: Exported functions
Function, get-peer-address-and-port: Internal functions
Function, get-post-data: Internal functions
Function, get-request-data: Internal functions
Function, get-stored-session: Internal functions
Function, handle-if-modified-since: Exported functions
Function, handle-static-file: Exported functions
Function, header-in*: Exported functions
Function, header-out: Exported functions
Function, header-out-set-p: Internal functions
Function, headers-in*: Exported functions
Function, headers-out*: Exported functions
Function, host: Exported functions
Function, http-token-p: Exported functions
Function, hunchentoot-error: Exported functions
Function, hunchentoot-warn: Internal functions
Function, hyperdoc-lookup: Internal functions
Function, hyperdoc-lookup: Internal functions
Function, input-chunking-p: Internal functions
Function, iso-time: Internal functions
Function, keep-alive-p: Internal functions
Function, letterp: Internal functions
Function, local-addr*: Exported functions
Function, local-port*: Exported functions
Function, log-message*: Exported functions
Function, make-condition-variable: Internal functions
Function, make-cooked-message: Internal functions
Function, make-defun-parameter: Internal functions
Function, make-lock: Internal functions
Function, make-socket-stream: Internal functions
Function, make-tmp-file-name: Internal functions
Function, maybe-add-charset-to-content-type-header: Internal functions
Function, maybe-handle-range-header: Internal functions
Function, maybe-read-post-parameters: Internal functions
Function, maybe-rewrite-urls-for-session: Internal functions
Function, md5-hex: Internal functions
Function, mime-type: Exported functions
Function, name-char-p: Internal functions
Function, no-cache: Exported functions
Function, not-implemented: Internal functions
Function, parameter: Exported functions
Function, parameter-error: Exported functions
Function, parse-content-type: Internal functions
Function, parse-multipart-form-data: Internal functions
Function, parse-path: Internal functions
Function, parse-rfc2388-form-data: Internal functions
Function, peek-char*: Internal functions
Function, post-parameter: Exported functions
Function, post-parameters*: Exported functions
Function, printable-ascii-char-p: Internal functions
Function, query-string*: Exported functions
Function, quote-string: Internal functions
Function, raw-post-data: Exported functions
Function, read-attribute: Internal functions
Function, read-delimited-string: Internal functions
Function, read-initial-request-line: Internal functions
Function, read-name: Internal functions
Function, read-until: Internal functions
Function, read-while: Internal functions
Function, real-remote-addr: Exported functions
Function, reason-phrase: Exported functions
Function, recompute-request-parameters: Exported functions
Function, redirect: Exported functions
Function, referer: Exported functions
Function, regenerate-session-cookie-value: Exported functions
Function, remote-addr*: Exported functions
Function, remote-port*: Exported functions
Function, remove-session: Exported functions
Function, reply-external-format*: Exported functions
Function, request-method*: Exported functions
Function, request-pathname: Exported functions
Function, request-uri*: Exported functions
Function, require-authorization: Exported functions
Function, reset-session-secret: Exported functions
Function, reset-sessions: Exported functions
Function, return-code*: Exported functions
Function, rewrite-urls: Exported functions
Function, rfc-1123-date: Exported functions
Function, scanner-for-get-param: Internal functions
Function, script-name*: Exported functions
Function, send-bad-request-response: Internal functions
Function, send-headers: Exported functions
Function, send-response: Internal functions
Function, send-service-unavailable-reply: Internal functions
Function, server-protocol*: Exported functions
Function, session-gc: Exported functions
Function, session-too-old-p: Exported functions
Function, session-value: Exported functions
Function, set-cookie: Exported functions
Function, set-cookie*: Exported functions
Function, set-timeouts: Internal functions
Function, skip-comment: Internal functions
Function, skip-whitespace: Internal functions
Function, ssl-p: Exported functions
Function, start-output: Internal functions
Function, start-session: Exported functions
Function, starts-with-one-of-p: Internal functions
Function, starts-with-p: Internal functions
Function, starts-with-scheme-p: Exported functions
Function, string-as-keyword: Internal functions
Function, stringify-session: Internal functions
Function, url-decode: Exported functions
Function, url-encode: Exported functions
Function, url-encode: Exported functions
Function, user-agent: Exported functions
Function, wake-acceptor-for-shutdown: Internal functions
Function, whitespacep: Internal functions
Function, within-request-p: Exported functions

G
Generic Function, (setf acceptor-access-log-destination): Exported generic functions
Generic Function, (setf acceptor-document-root): Exported generic functions
Generic Function, (setf acceptor-error-template-directory): Exported generic functions
Generic Function, (setf acceptor-input-chunking-p): Exported generic functions
Generic Function, (setf acceptor-listen-socket): Internal generic functions
Generic Function, (setf acceptor-message-log-destination): Exported generic functions
Generic Function, (setf acceptor-name): Exported generic functions
Generic Function, (setf acceptor-output-chunking-p): Exported generic functions
Generic Function, (setf acceptor-persistent-connections-p): Exported generic functions
Generic Function, (setf acceptor-process): Internal generic functions
Generic Function, (setf acceptor-reply-class): Exported generic functions
Generic Function, (setf acceptor-request-class): Exported generic functions
Generic Function, (setf acceptor-shutdown-lock): Internal generic functions
Generic Function, (setf acceptor-shutdown-p): Internal generic functions
Generic Function, (setf acceptor-shutdown-queue): Internal generic functions
Generic Function, (setf accessor-requests-in-progress): Internal generic functions
Generic Function, (setf aux-data): Internal generic functions
Generic Function, (setf cookie-domain): Exported generic functions
Generic Function, (setf cookie-expires): Exported generic functions
Generic Function, (setf cookie-http-only): Exported generic functions
Generic Function, (setf cookie-max-age): Exported generic functions
Generic Function, (setf cookie-path): Exported generic functions
Generic Function, (setf cookie-secure): Exported generic functions
Generic Function, (setf cookie-value): Exported generic functions
Generic Function, (setf cookies-out): Exported generic functions
Generic Function, (setf header-out): Exported generic functions
Generic Function, (setf reply-external-format): Exported generic functions
Generic Function, (setf return-code): Exported generic functions
Generic Function, (setf session): Exported generic functions
Generic Function, (setf session-db): Exported generic functions
Generic Function, (setf session-max-time): Exported generic functions
Generic Function, (setf taskmaster-accept-count): Internal generic functions
Generic Function, (setf taskmaster-acceptor): Exported generic functions
Generic Function, (setf taskmaster-max-accept-count): Exported generic functions
Generic Function, (setf taskmaster-max-thread-count): Exported generic functions
Generic Function, (setf taskmaster-thread-count): Exported generic functions
Generic Function, (setf taskmaster-worker-thread-name-format): Internal generic functions
Generic Function, accept-connections: Exported generic functions
Generic Function, acceptor-access-log-destination: Exported generic functions
Generic Function, acceptor-address: Exported generic functions
Generic Function, acceptor-dispatch-request: Exported generic functions
Generic Function, acceptor-document-root: Exported generic functions
Generic Function, acceptor-error-template-directory: Exported generic functions
Generic Function, acceptor-input-chunking-p: Exported generic functions
Generic Function, acceptor-listen-backlog: Exported generic functions
Generic Function, acceptor-listen-socket: Internal generic functions
Generic Function, acceptor-log-access: Exported generic functions
Generic Function, acceptor-log-message: Exported generic functions
Generic Function, acceptor-message-log-destination: Exported generic functions
Generic Function, acceptor-name: Exported generic functions
Generic Function, acceptor-output-chunking-p: Exported generic functions
Generic Function, acceptor-persistent-connections-p: Exported generic functions
Generic Function, acceptor-port: Exported generic functions
Generic Function, acceptor-process: Internal generic functions
Generic Function, acceptor-read-timeout: Exported generic functions
Generic Function, acceptor-remove-session: Exported generic functions
Generic Function, acceptor-reply-class: Exported generic functions
Generic Function, acceptor-request-class: Exported generic functions
Generic Function, acceptor-server-name: Internal generic functions
Generic Function, acceptor-shutdown-lock: Internal generic functions
Generic Function, acceptor-shutdown-p: Internal generic functions
Generic Function, acceptor-shutdown-queue: Internal generic functions
Generic Function, acceptor-ssl-certificate-file: Exported generic functions
Generic Function, acceptor-ssl-p: Exported generic functions
Generic Function, acceptor-ssl-privatekey-file: Exported generic functions
Generic Function, acceptor-ssl-privatekey-password: Exported generic functions
Generic Function, acceptor-status-message: Exported generic functions
Generic Function, acceptor-taskmaster: Internal generic functions
Generic Function, acceptor-write-timeout: Exported generic functions
Generic Function, accessor-requests-in-progress: Internal generic functions
Generic Function, assoc*: Internal generic functions
Generic Function, aux-data: Internal generic functions
Generic Function, content-length: Exported generic functions
Generic Function, content-stream: Internal generic functions
Generic Function, content-type: Exported generic functions
Generic Function, cookie-domain: Exported generic functions
Generic Function, cookie-expires: Exported generic functions
Generic Function, cookie-http-only: Exported generic functions
Generic Function, cookie-max-age: Exported generic functions
Generic Function, cookie-name: Exported generic functions
Generic Function, cookie-path: Exported generic functions
Generic Function, cookie-secure: Exported generic functions
Generic Function, cookie-value: Exported generic functions
Generic Function, cookies-in: Exported generic functions
Generic Function, cookies-out: Exported generic functions
Generic Function, create-request-handler-thread: Exported generic functions
Generic Function, decrement-taskmaster-accept-count: Internal generic functions
Generic Function, decrement-taskmaster-thread-count: Exported generic functions
Generic Function, detach-socket: Exported generic functions
Generic Function, execute-acceptor: Exported generic functions
Generic Function, get-parameters: Exported generic functions
Generic Function, handle-incoming-connection: Exported generic functions
Generic Function, handle-incoming-connection%: Internal generic functions
Generic Function, handle-request: Exported generic functions
Generic Function, header-in: Exported generic functions
Generic Function, headers-in: Exported generic functions
Generic Function, headers-out: Exported generic functions
Generic Function, hunchentoot-operation-not-implemented-operation: Internal generic functions
Generic Function, increment-taskmaster-accept-count: Internal generic functions
Generic Function, increment-taskmaster-thread-count: Exported generic functions
Generic Function, initialize-connection-stream: Exported generic functions
Generic Function, local-addr: Exported generic functions
Generic Function, local-port: Exported generic functions
Generic Function, maybe-invoke-debugger: Exported generic functions
Generic Function, next-session-id: Exported generic functions
Generic Function, note-free-connection: Internal generic functions
Generic Function, post-parameters: Exported generic functions
Generic Function, process-connection: Exported generic functions
Generic Function, process-request: Exported generic functions
Generic Function, query-string: Exported generic functions
Generic Function, remote-addr: Exported generic functions
Generic Function, remote-port: Exported generic functions
Generic Function, reply-external-format: Exported generic functions
Generic Function, request-acceptor: Exported generic functions
Generic Function, request-method: Exported generic functions
Generic Function, request-uri: Exported generic functions
Generic Function, reset-connection-stream: Exported generic functions
Generic Function, return-code: Exported generic functions
Generic Function, script-name: Exported generic functions
Generic Function, server-protocol: Exported generic functions
Generic Function, session: Exported generic functions
Generic Function, session-cookie-name: Exported generic functions
Generic Function, session-cookie-value: Exported generic functions
Generic Function, session-created: Exported generic functions
Generic Function, session-data: Internal generic functions
Generic Function, session-db: Exported generic functions
Generic Function, session-db-lock: Exported generic functions
Generic Function, session-id: Exported generic functions
Generic Function, session-last-click: Internal generic functions
Generic Function, session-max-time: Exported generic functions
Generic Function, session-remote-addr: Exported generic functions
Generic Function, session-start: Exported generic functions
Generic Function, session-string: Internal generic functions
Generic Function, session-user-agent: Exported generic functions
Generic Function, session-verify: Exported generic functions
Generic Function, shutdown: Exported generic functions
Generic Function, start: Exported generic functions
Generic Function, start-listening: Exported generic functions
Generic Function, start-thread: Exported generic functions
Generic Function, started-p: Exported generic functions
Generic Function, stop: Exported generic functions
Generic Function, stringify-cookie: Internal generic functions
Generic Function, taskmaster-accept-count: Internal generic functions
Generic Function, taskmaster-accept-count-lock: Internal generic functions
Generic Function, taskmaster-acceptor: Exported generic functions
Generic Function, taskmaster-max-accept-count: Exported generic functions
Generic Function, taskmaster-max-thread-count: Exported generic functions
Generic Function, taskmaster-thread-count: Exported generic functions
Generic Function, taskmaster-thread-count-lock: Internal generic functions
Generic Function, taskmaster-wait-lock: Internal generic functions
Generic Function, taskmaster-wait-queue: Internal generic functions
Generic Function, taskmaster-worker-thread-name-format: Internal generic functions
Generic Function, too-many-taskmaster-requests: Exported generic functions
Generic Function, wait-for-free-connection: Internal generic functions
Generic Function, write-header-line: Internal generic functions
get-backtrace: Internal functions
get-local-address-and-port: Internal functions
get-parameter: Exported functions
get-parameters: Exported generic functions
get-parameters: Exported generic functions
get-parameters*: Exported functions
get-peer-address-and-port: Internal functions
get-post-data: Internal functions
get-request-data: Internal functions
get-stored-session: Internal functions

H
handle-if-modified-since: Exported functions
handle-incoming-connection: Exported generic functions
handle-incoming-connection: Exported generic functions
handle-incoming-connection: Exported generic functions
handle-incoming-connection%: Internal generic functions
handle-incoming-connection%: Internal generic functions
handle-request: Exported generic functions
handle-request: Exported generic functions
handle-static-file: Exported functions
handler-case*: Internal macros
header-in: Exported generic functions
header-in: Exported generic functions
header-in*: Exported functions
header-out: Exported functions
header-out-set-p: Internal functions
headers-in: Exported generic functions
headers-in: Exported generic functions
headers-in*: Exported functions
headers-out: Exported generic functions
headers-out: Exported generic functions
headers-out*: Exported functions
host: Exported functions
http-token-p: Exported functions
hunchentoot-error: Exported functions
hunchentoot-operation-not-implemented-operation: Internal generic functions
hunchentoot-operation-not-implemented-operation: Internal generic functions
hunchentoot-warn: Internal functions
hyperdoc-lookup: Internal functions
hyperdoc-lookup: Internal functions

I
ignore-errors*: Internal macros
increment-taskmaster-accept-count: Internal generic functions
increment-taskmaster-accept-count: Internal generic functions
increment-taskmaster-thread-count: Exported generic functions
increment-taskmaster-thread-count: Exported generic functions
increment-taskmaster-thread-count: Exported generic functions
initialize-connection-stream: Exported generic functions
initialize-connection-stream: Exported generic functions
initialize-connection-stream: Exported generic functions
input-chunking-p: Internal functions
iso-time: Internal functions

K
keep-alive-p: Internal functions

L
letterp: Internal functions
local-addr: Exported generic functions
local-addr: Exported generic functions
local-addr*: Exported functions
local-port: Exported generic functions
local-port: Exported generic functions
local-port*: Exported functions
log-message*: Exported functions

M
Macro, def-http-return-code: Internal macros
Macro, defconstant: Internal macros
Macro, define-easy-handler: Exported macros
Macro, defvar-unbound: Internal macros
Macro, handler-case*: Internal macros
Macro, ignore-errors*: Internal macros
Macro, upgrade-vector: Internal macros
Macro, when-let: Internal macros
Macro, with-acceptor-request-count-incremented: Internal macros
Macro, with-conditions-caught-and-logged: Internal macros
Macro, with-debugger: Internal macros
Macro, with-lock-held: Internal macros
Macro, with-log-stream: Internal macros
Macro, with-mapped-conditions: Internal macros
Macro, with-rebinding: Internal macros
Macro, with-session-lock-held: Internal macros
Macro, with-unique-names: Internal macros
make-condition-variable: Internal functions
make-cooked-message: Internal functions
make-defun-parameter: Internal functions
make-lock: Internal functions
make-socket-stream: Internal functions
make-tmp-file-name: Internal functions
maybe-add-charset-to-content-type-header: Internal functions
maybe-handle-range-header: Internal functions
maybe-invoke-debugger: Exported generic functions
maybe-invoke-debugger: Exported generic functions
maybe-read-post-parameters: Internal functions
maybe-rewrite-urls-for-session: Internal functions
md5-hex: Internal functions
Method, (setf acceptor-access-log-destination): Exported generic functions
Method, (setf acceptor-document-root): Exported generic functions
Method, (setf acceptor-error-template-directory): Exported generic functions
Method, (setf acceptor-input-chunking-p): Exported generic functions
Method, (setf acceptor-listen-socket): Internal generic functions
Method, (setf acceptor-message-log-destination): Exported generic functions
Method, (setf acceptor-name): Exported generic functions
Method, (setf acceptor-output-chunking-p): Exported generic functions
Method, (setf acceptor-persistent-connections-p): Exported generic functions
Method, (setf acceptor-process): Internal generic functions
Method, (setf acceptor-reply-class): Exported generic functions
Method, (setf acceptor-request-class): Exported generic functions
Method, (setf acceptor-shutdown-lock): Internal generic functions
Method, (setf acceptor-shutdown-p): Internal generic functions
Method, (setf acceptor-shutdown-queue): Internal generic functions
Method, (setf accessor-requests-in-progress): Internal generic functions
Method, (setf aux-data): Internal generic functions
Method, (setf cookie-domain): Exported generic functions
Method, (setf cookie-expires): Exported generic functions
Method, (setf cookie-http-only): Exported generic functions
Method, (setf cookie-max-age): Exported generic functions
Method, (setf cookie-path): Exported generic functions
Method, (setf cookie-secure): Exported generic functions
Method, (setf cookie-value): Exported generic functions
Method, (setf cookies-out): Exported generic functions
Method, (setf header-out): Exported generic functions
Method, (setf header-out): Exported generic functions
Method, (setf header-out): Exported generic functions
Method, (setf header-out): Exported generic functions
Method, (setf reply-external-format): Exported generic functions
Method, (setf return-code): Exported generic functions
Method, (setf session): Exported generic functions
Method, (setf session-db): Exported generic functions
Method, (setf session-max-time): Exported generic functions
Method, (setf taskmaster-accept-count): Internal generic functions
Method, (setf taskmaster-acceptor): Exported generic functions
Method, (setf taskmaster-max-accept-count): Exported generic functions
Method, (setf taskmaster-max-thread-count): Exported generic functions
Method, (setf taskmaster-thread-count): Exported generic functions
Method, (setf taskmaster-worker-thread-name-format): Internal generic functions
Method, accept-connections: Exported generic functions
Method, acceptor-access-log-destination: Exported generic functions
Method, acceptor-address: Exported generic functions
Method, acceptor-dispatch-request: Exported generic functions
Method, acceptor-dispatch-request: Exported generic functions
Method, acceptor-document-root: Exported generic functions
Method, acceptor-error-template-directory: Exported generic functions
Method, acceptor-input-chunking-p: Exported generic functions
Method, acceptor-listen-backlog: Exported generic functions
Method, acceptor-listen-socket: Internal generic functions
Method, acceptor-log-access: Exported generic functions
Method, acceptor-log-message: Exported generic functions
Method, acceptor-message-log-destination: Exported generic functions
Method, acceptor-name: Exported generic functions
Method, acceptor-output-chunking-p: Exported generic functions
Method, acceptor-persistent-connections-p: Exported generic functions
Method, acceptor-port: Exported generic functions
Method, acceptor-process: Internal generic functions
Method, acceptor-read-timeout: Exported generic functions
Method, acceptor-remove-session: Exported generic functions
Method, acceptor-reply-class: Exported generic functions
Method, acceptor-request-class: Exported generic functions
Method, acceptor-server-name: Internal generic functions
Method, acceptor-shutdown-lock: Internal generic functions
Method, acceptor-shutdown-p: Internal generic functions
Method, acceptor-shutdown-queue: Internal generic functions
Method, acceptor-ssl-certificate-file: Exported generic functions
Method, acceptor-ssl-p: Exported generic functions
Method, acceptor-ssl-p: Exported generic functions
Method, acceptor-ssl-privatekey-file: Exported generic functions
Method, acceptor-ssl-privatekey-password: Exported generic functions
Method, acceptor-status-message: Exported generic functions
Method, acceptor-status-message: Exported generic functions
Method, acceptor-status-message: Exported generic functions
Method, acceptor-taskmaster: Internal generic functions
Method, acceptor-write-timeout: Exported generic functions
Method, accessor-requests-in-progress: Internal generic functions
Method, assoc*: Internal generic functions
Method, assoc*: Internal generic functions
Method, assoc*: Internal generic functions
Method, aux-data: Internal generic functions
Method, content-length: Exported generic functions
Method, content-stream: Internal generic functions
Method, content-type: Exported generic functions
Method, cookie-domain: Exported generic functions
Method, cookie-expires: Exported generic functions
Method, cookie-http-only: Exported generic functions
Method, cookie-max-age: Exported generic functions
Method, cookie-name: Exported generic functions
Method, cookie-path: Exported generic functions
Method, cookie-secure: Exported generic functions
Method, cookie-value: Exported generic functions
Method, cookies-in: Exported generic functions
Method, cookies-out: Exported generic functions
Method, create-request-handler-thread: Exported generic functions
Method, decrement-taskmaster-accept-count: Internal generic functions
Method, decrement-taskmaster-thread-count: Exported generic functions
Method, decrement-taskmaster-thread-count: Exported generic functions
Method, detach-socket: Exported generic functions
Method, execute-acceptor: Exported generic functions
Method, execute-acceptor: Exported generic functions
Method, get-parameters: Exported generic functions
Method, handle-incoming-connection: Exported generic functions
Method, handle-incoming-connection: Exported generic functions
Method, handle-incoming-connection%: Internal generic functions
Method, handle-request: Exported generic functions
Method, header-in: Exported generic functions
Method, headers-in: Exported generic functions
Method, headers-out: Exported generic functions
Method, hunchentoot-operation-not-implemented-operation: Internal generic functions
Method, increment-taskmaster-accept-count: Internal generic functions
Method, increment-taskmaster-thread-count: Exported generic functions
Method, increment-taskmaster-thread-count: Exported generic functions
Method, initialize-connection-stream: Exported generic functions
Method, initialize-connection-stream: Exported generic functions
Method, local-addr: Exported generic functions
Method, local-port: Exported generic functions
Method, maybe-invoke-debugger: Exported generic functions
Method, next-session-id: Exported generic functions
Method, note-free-connection: Internal generic functions
Method, post-parameters: Exported generic functions
Method, post-parameters: