The tbnl Reference Manual

Table of Contents

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

The tbnl Reference Manual

This is the tbnl Reference Manual, version 0.11.4, generated automatically by Declt version 2.3 "Robert April" on Tue Jan 09 15:50:34 2018 GMT+0.


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

1 Introduction

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


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 tbnl

Version

0.11.4

Dependencies
Source

tbnl.asd (file)

Components

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

3 Files

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


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

3.1 Lisp


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

3.1.1 tbnl.asd

Location

tbnl.asd

Systems

tbnl (system)

Packages

tbnl-asd

Exported Definitions

*tbnl-version* (special variable)


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

3.1.2 tbnl/packages.lisp

Parent

tbnl (system)

Location

packages.lisp

Packages

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

3.1.3 tbnl/specials.lisp

Dependency

packages.lisp (file)

Parent

tbnl (system)

Location

specials.lisp

Exported Definitions
Internal Definitions

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

3.1.4 tbnl/mime-types.lisp

Dependency

specials.lisp (file)

Parent

tbnl (system)

Location

mime-types.lisp

Internal Definitions

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

3.1.5 tbnl/util.lisp

Dependency

mime-types.lisp (file)

Parent

tbnl (system)

Location

util.lisp

Packages

tbnl-dummy

Exported Definitions
Internal Definitions

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

3.1.6 tbnl/log.lisp

Dependency

util.lisp (file)

Parent

tbnl (system)

Location

log.lisp

Exported Definitions

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

3.1.7 tbnl/cookie.lisp

Dependency

log.lisp (file)

Parent

tbnl (system)

Location

cookie.lisp

Exported Definitions
Internal Definitions

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

3.1.8 tbnl/reply.lisp

Dependency

cookie.lisp (file)

Parent

tbnl (system)

Location

reply.lisp

Exported Definitions
Internal Definitions

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

3.1.9 tbnl/request.lisp

Dependency

reply.lisp (file)

Parent

tbnl (system)

Location

request.lisp

Exported Definitions
Internal Definitions

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

3.1.10 tbnl/session.lisp

Dependency

request.lisp (file)

Parent

tbnl (system)

Location

session.lisp

Exported Definitions
Internal Definitions

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

3.1.11 tbnl/html.lisp

Dependency

session.lisp (file)

Parent

tbnl (system)

Location

html.lisp

Exported Definitions
Internal Definitions

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

3.1.12 tbnl/easy-handlers.lisp

Dependency

html.lisp (file)

Parent

tbnl (system)

Location

easy-handlers.lisp

Exported Definitions
Internal Definitions

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

3.1.13 tbnl/modlisp.lisp

Dependency

easy-handlers.lisp (file)

Parent

tbnl (system)

Location

modlisp.lisp

Exported Definitions
Internal Definitions

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

3.1.14 tbnl/araneida.lisp

Dependency

modlisp.lisp (file)

Parent

tbnl (system)

Location

araneida.lisp


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

4 Packages

Packages are listed by definition order.


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

4.1 tbnl-asd

Source

tbnl.asd

Use List
Exported Definitions

*tbnl-version* (special variable)


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

4.2 tbnl-contrib

Source

packages.lisp (file)

Use List

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

4.3 tbnl

Source

packages.lisp (file)

Use List
Used By List

tbnl-contrib

Exported Definitions
Internal Definitions

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

4.4 tbnl-dummy

Source

util.lisp (file)


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

5 Definitions

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


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

5.1 Exported definitions


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

5.1.1 Constants

Constant: +http-accepted+
Package

tbnl

Source

specials.lisp (file)

Constant: +http-authorization-required+
Package

tbnl

Source

specials.lisp (file)

Constant: +http-bad-gateway+
Package

tbnl

Source

specials.lisp (file)

Constant: +http-bad-request+
Package

tbnl

Source

specials.lisp (file)

Constant: +http-conflict+
Package

tbnl

Source

specials.lisp (file)

Constant: +http-continue+
Package

tbnl

Source

specials.lisp (file)

Constant: +http-created+
Package

tbnl

Source

specials.lisp (file)

Constant: +http-expectation-failed+
Package

tbnl

Source

specials.lisp (file)

Constant: +http-forbidden+
Package

tbnl

Source

specials.lisp (file)

Constant: +http-gateway-time-out+
Package

tbnl

Source

specials.lisp (file)

Constant: +http-gone+
Package

tbnl

Source

specials.lisp (file)

Constant: +http-internal-server-error+
Package

tbnl

Source

specials.lisp (file)

Constant: +http-length-required+
Package

tbnl

Source

specials.lisp (file)

Constant: +http-method-not-allowed+
Package

tbnl

Source

specials.lisp (file)

Constant: +http-moved-permanently+
Package

tbnl

Source

specials.lisp (file)

Constant: +http-moved-temporarily+
Package

tbnl

Source

specials.lisp (file)

Constant: +http-multiple-choices+
Package

tbnl

Source

specials.lisp (file)

Constant: +http-no-content+
Package

tbnl

Source

specials.lisp (file)

Constant: +http-non-authoritative-information+
Package

tbnl

Source

specials.lisp (file)

Constant: +http-not-acceptable+
Package

tbnl

Source

specials.lisp (file)

Constant: +http-not-found+
Package

tbnl

Source

specials.lisp (file)

Constant: +http-not-implemented+
Package

tbnl

Source

specials.lisp (file)

Constant: +http-not-modified+
Package

tbnl

Source

specials.lisp (file)

Constant: +http-ok+
Package

tbnl

Source

specials.lisp (file)

Constant: +http-partial-content+
Package

tbnl

Source

specials.lisp (file)

Constant: +http-payment-required+
Package

tbnl

Source

specials.lisp (file)

Constant: +http-precondition-failed+
Package

tbnl

Source

specials.lisp (file)

Constant: +http-proxy-authentication-required+
Package

tbnl

Source

specials.lisp (file)

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

tbnl

Source

specials.lisp (file)

Constant: +http-request-time-out+
Package

tbnl

Source

specials.lisp (file)

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

tbnl

Source

specials.lisp (file)

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

tbnl

Source

specials.lisp (file)

Constant: +http-reset-content+
Package

tbnl

Source

specials.lisp (file)

Constant: +http-see-other+
Package

tbnl

Source

specials.lisp (file)

Constant: +http-service-unavailable+
Package

tbnl

Source

specials.lisp (file)

Constant: +http-switching-protocols+
Package

tbnl

Source

specials.lisp (file)

Constant: +http-temporary-redirect+
Package

tbnl

Source

specials.lisp (file)

Constant: +http-unsupported-media-type+
Package

tbnl

Source

specials.lisp (file)

Constant: +http-use-proxy+
Package

tbnl

Source

specials.lisp (file)

Constant: +http-version-not-supported+
Package

tbnl

Source

specials.lisp (file)

Constant: +latin-1+
Package

tbnl

Source

specials.lisp (file)

Constant: +utf-8+
Package

tbnl

Source

specials.lisp (file)


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

5.1.2 Special variables

Special Variable: *backtrace*

The backtrace (as a string) of the last error.

Package

tbnl

Source

specials.lisp (file)

Special Variable: *body*

The body which was sent to the front-end or to the browser.

Package

tbnl

Source

specials.lisp (file)

Special Variable: *catch-errors-p*

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

Package

tbnl

Source

specials.lisp (file)

Special Variable: *command*

The current request as read from *TBNL-STREAM*, converted into an alist.

Package

tbnl

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

tbnl

Source

specials.lisp (file)

Special Variable: *debug-mode*

Whether we’re in debug mode.

Package

tbnl

Source

specials.lisp (file)

Special Variable: *default-content-type*

The default content-type header which is returned to the client.

Package

tbnl

Source

specials.lisp (file)

Special Variable: *default-handler*

The name of the function which is always returned by DEFAULT-DISPATCHER.

Package

tbnl

Source

specials.lisp (file)

Special Variable: *default-log-level*

The default log level for LOG-MESSAGE*

Package

tbnl

Source

specials.lisp (file)

Special Variable: *dispatch-table*

A list of dispatch functions - see function PROCESS-REQUEST.

Package

tbnl

Source

specials.lisp (file)

Special Variable: *error*

The last error or warning handled by TBNL.

Package

tbnl

Source

specials.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 TBNL. The pathname denotes the temporary file to which the uploaded file is written. The hook is called directly before the file is created.

Package

tbnl

Source

specials.lisp (file)

Special Variable: *http-error-handler*

Contains NIL (the default) or a function of one argument which is called if the content handler has set a return code other than +HTTP-OK+ or +HTTP-NOT-MODIFIED+.

Package

tbnl

Source

specials.lisp (file)

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

Log level for Lisp errors.

Package

tbnl

Source

specials.lisp (file)

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

Log level for Lisp warnings.

Package

tbnl

Source

specials.lisp (file)

Special Variable: *listener*

The KMRCL:LISTENER object which currently listens on *TBNL-PORT*

Package

tbnl

Source

specials.lisp (file)

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

Whether Lisp backtraces should be logged when an error occurs. Will only have effect of *LOG-LISP-ERRORS-P* or *LOG-LISP-BACKTRACES* are also true.

Package

tbnl

Source

specials.lisp (file)

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

Whether Lisp errors should be logged.

Package

tbnl

Source

specials.lisp (file)

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

Whether Lisp warnings should be logged.

Package

tbnl

Source

specials.lisp (file)

Special Variable: *log-prefix*

The prefix which is printed in front of Apache log messages. This should be a string or T (for "TBNL", the default) or NIL (meaning no prefix).

Package

tbnl

Source

specials.lisp (file)

Special Variable: *reply*

The current REPLY object.

Package

tbnl

Source

specials.lisp (file)

Special Variable: *request*

The current REQUEST object.

Package

tbnl

Source

specials.lisp (file)

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

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

Package

tbnl

Source

specials.lisp (file)

Special Variable: *session*

The current SESSION object.

Package

tbnl

Source

specials.lisp (file)

Special Variable: *session-cookie-name*

The name of the cookie (or the GET parameter) which is used to store the session on the client side.

Package

tbnl

Source

specials.lisp (file)

Special Variable: *session-max-time*

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

Package

tbnl

Source

specials.lisp (file)

Special Variable: *session-removal-hook*

A function of one argument (a session object) which is called whenever a session is garbage-collected.

Package

tbnl

Source

specials.lisp (file)

Special Variable: *show-access-log-messages*

Whether routine messages about each request should be logged. This will only be done if *USE-APACHE-LOG* is NIL.

Package

tbnl

Source

specials.lisp (file)

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

Whether Lisp backtraces should be shown in HTML output when an error occurs. Will only have effect of *SHOW-LISP-ERRORS-P* is also true.

Package

tbnl

Source

specials.lisp (file)

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

Whether Lisp errors should be shown in HTML output.

Package

tbnl

Source

specials.lisp (file)

Special Variable: *tbnl-default-external-format*
Package

tbnl

Source

specials.lisp (file)

Special Variable: *tbnl-port*

The port TBNL is listening on.

Package

tbnl

Source

specials.lisp (file)

Special Variable: *tbnl-version*

A string denoting the current version of TBNL. Used for diagnostic output.

Package

tbnl-asd

Source

tbnl.asd

Special Variable: *tmp-directory*

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

Package

tbnl

Source

specials.lisp (file)

Special Variable: *use-apache-log*

Whether log messages should be sent as headers (assuming that mod_lisp hands them over to Apache).

Package

tbnl

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

tbnl

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

tbnl

Source

specials.lisp (file)


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

5.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 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 NAME.

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.

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 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 TBNL. Specifically, all the parameter computations above will only happen if *REQUEST* is bound, i.e. if we’re within a TBNL
request. Otherwise, VAR will always be bound to the result of evaluating INIT-FORM unless a corresponding keyword argument is provided.

Package

tbnl

Source

easy-handlers.lisp (file)

Macro: do-sessions (VAR &optional RESULT-FORM) &body BODY

Executes BODY with VAR bound to each existing SESSION object consecutively. Returns the values returned by RESULT-FORM unless RETURN is executed. The scope of the binding of VAR does not include RESULT-FORM.

Package

tbnl

Source

session.lisp (file)


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

5.1.4 Functions

Function: authorization &optional REQUEST

Returns as two values the user and password (if any) as captured in the ’AUTHORIZATION’ header of the REQUEST object REQUEST.

Package

tbnl

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.

Package

tbnl

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

tbnl

Source

request.lisp (file)

Reader

aux-request-value (function)

Function: content-length &optional REPLY

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

Package

tbnl

Source

reply.lisp (file)

Setf Expander

(setf content-length) (setf expander)

Setf Expander: (setf content-length) &optional REPLY

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

Package

tbnl

Source

reply.lisp (file)

Reader

content-length (function)

Function: content-type &optional REPLY

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

Package

tbnl

Source

reply.lisp (file)

Setf Expander

(setf content-type) (setf expander)

Setf Expander: (setf content-type) &optional REPLY

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

Package

tbnl

Source

reply.lisp (file)

Reader

content-type (function)

Function: cookie-in NAME &optional REQUEST

Returns the cookie with the name NAME (if any) as sent by the browser and captured in the REQUEST object REQUEST.

Package

tbnl

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

tbnl

Source

reply.lisp (file)

Function: cookies-in &optional REQUEST

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

Package

tbnl

Source

request.lisp (file)

Function: cookies-out &optional REPLY

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

Package

tbnl

Source

reply.lisp (file)

Function: create-folder-dispatcher-and-handler URI-PREFIX BASE-PATH &optional DEFAULT-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. The content types of the files are determined via their suffix, falling back to DEFAULT-CONTENT-TYPE if the suffix is unknown.

Package

tbnl

Source

html.lisp (file)

Function: create-prefix-dispatcher PREFIX PAGE-FUNCTION

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

Package

tbnl

Source

html.lisp (file)

Function: create-regex-dispatcher REGEX PAGE-FUNCTION

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

Package

tbnl

Source

html.lisp (file)

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

Creates and returns a 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

tbnl

Source

html.lisp (file)

Function: default-dispatcher REQUEST

Default dispatch function which handles every request with the function stored in *DEFAULT-HANDLER*.

Package

tbnl

Source

html.lisp (file)

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

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

Package

tbnl

Source

request.lisp (file)

Function: delete-session-value SYMBOL &optional SESSION

Removes the value associated with SYMBOL from the current session object if there is one.

Package

tbnl

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

tbnl

Source

easy-handlers.lisp (file)

Function: escape-for-html STRING

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

Package

tbnl

Source

util.lisp (file)

Function: get-backtrace ERROR

This is the function that is used internally by TBNL to
show or log backtraces. It accepts a condition object ERROR and returns a string with the corresponding backtrace.

Package

tbnl

Source

util.lisp (file)

Function: get-parameter NAME &optional REQUEST

Returns the GET parameter with name NAME as captured in the REQUEST object REQUEST. Search is case-sensitive.

Package

tbnl

Source

request.lisp (file)

Function: get-parameters &optional REQUEST

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

Package

tbnl

Source

request.lisp (file)

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

Handles the If-Modified-Since header of the REQUEST. Date string is compared to the one generated from the supplied TIME.

Package

tbnl

Source

request.lisp (file)

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

A function which acts like a TBNL handler for the file denoted by PATH. Send 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

tbnl

Source

html.lisp (file)

Function: header-in NAME &optional REQUEST

Returns the incoming header with name NAME as captured in the REQUEST object REQUEST. Search is case-insensitive.

Package

tbnl

Source

request.lisp (file)

Function: header-out NAME &optional REPLY

Returns the current value of the outgoing http header named NAME. Search is case-insensitive.

Package

tbnl

Source

reply.lisp (file)

Setf Expander

(setf header-out) (setf expander)

Setf Expander: (setf header-out) NAME &optional REPLY

Changes the current value of the outgoing http header named NAME. Search is case-insensitive. If a header with this name doesn’t exist it is created.

Package

tbnl

Source

reply.lisp (file)

Reader

header-out (function)

Function: headers-in &optional REQUEST

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

Package

tbnl

Source

request.lisp (file)

Function: headers-out &optional REPLY

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

Package

tbnl

Source

reply.lisp (file)

Function: host &optional REQUEST

Returns the ’Host’ incoming http header value captured in the REQUEST object REQUEST.

Package

tbnl

Source

request.lisp (file)

Function: http-token-p TOKEN

Tests whether TOKEN is a string which is a valid ’token’ according to HTTP/1.1 (RFC 2068).

Package

tbnl

Source

util.lisp (file)

Function: log-file ()

Returns the log file which is currently used.

Package

tbnl

Source

log.lisp (file)

Writer

(setf log-file) (function)

Function: (setf log-file) PATHSPEC

Sets the log file which is to be used.

Package

tbnl

Source

log.lisp (file)

Reader

log-file (function)

Function: log-message* FMT &rest ARGS

Same as LOG-MESSAGE* but with the default log level (as defined by *DEFAULT-LOG-LEVEL*).

Package

tbnl

Source

log.lisp (file)

Function: mod-lisp-id &optional REQUEST

Returns the ’Server ID’ sent by mod_lisp as captured in the REQUEST object REQUEST. This value is set in Apache’s server configuration file and is of course only available if mod_lisp is the front-end.

Package

tbnl

Source

request.lisp (file)

Function: no-cache ()

Adds appropriate headers to completely prevent caching on most browsers.

Package

tbnl

Source

modlisp.lisp (file)

Function: parameter NAME &optional REQUEST

Returns the GET or the POST parameter with name NAME as captured in the REQUEST object REQUEST. If both a GET and a POST parameter with the same name exist the GET parameter is returned. Search is case-sensitive.

Package

tbnl

Source

request.lisp (file)

Function: post-parameter NAME &optional REQUEST

Returns the POST parameter with name NAME as captured in the REQUEST object REQUEST. Search is case-sensitive.

Package

tbnl

Source

request.lisp (file)

Function: post-parameters &optional REQUEST

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

Package

tbnl

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

tbnl

Source

request.lisp (file)

Function: raw-post-data &optional REQUEST

Returns the raw string sent as the body of a POST request.

Package

tbnl

Source

request.lisp (file)

Function: read-from-string* STRING

Safe version of READ-FROM-STRING: Symbols are interned in the :TBNL-DUMMY package, *READ-EVAL* is turned off.

Package

tbnl

Source

util.lisp (file)

Function: real-remote-addr &optional REQUEST

Returns the ’X-Forwarded-For’ incoming http header value captured in the REQUEST object REQUEST if it exists. Otherwise returns the value of REMOTE-ADDR.

Package

tbnl

Source

request.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 using a different external format.

Package

tbnl

Source

request.lisp (file)

Function: redirect SCRIPT-NAME &key HOST PROTOCOL ADD-SESSION-ID PERMANENTLY

Redirects the browser to the resource SCRIPT-NAME on host
HOST. PROTOCOL must be one of the keywords :HTTP or :HTTPS. Adds a session ID if ADD-SESSION-ID is true. If PERMANENTLY is true, a 301 request is sent to the browser, otherwise a 302.

Package

tbnl

Source

modlisp.lisp (file)

Function: referer &optional REQUEST

Returns the ’Referer’ (sic!) incoming http header value captured in the REQUEST object REQUEST.

Package

tbnl

Source

request.lisp (file)

Function: remote-addr &optional REQUEST

Returns the ’REMOTE_ADDR’ header (if sent by the front-end, otherwise the IP address of the remote host if available) as captured in the REQUEST object REQUEST. See also REAL-REMOTE-ADDR.

Package

tbnl

Source

request.lisp (file)

Function: remote-port &key REQUEST AS-NUMBER

Returns the ’REMOTE_PORT’ header (if sent by the front-end, otherwise the IP port of the remote host) as captured in the REQUEST object REQUEST. If AS-NUMBER is true, which is the default, the value is returned as a number, otherwise as a string.

Package

tbnl

Source

request.lisp (file)

Function: request-method &key REQUEST AS-KEYWORD

Returns the ’REQUEST_METHOD’ header (if sent by the front-end) as captured in the REQUEST object REQUEST. If AS-KEYWORD is true, which is the default, the value will be returned as a keyword like :GET or :POST.

Package

tbnl

Source

request.lisp (file)

Function: request-uri &optional REQUEST

Returns the ’REQUEST_URI’ header (if sent by the front-end) as captured in the REQUEST object REQUEST.

Package

tbnl

Source

request.lisp (file)

Function: require-authorization &optional REALM
Package

tbnl

Source

modlisp.lisp (file)

Function: reset-sessions ()

Removes ALL stored sessions and creates a new session secret.

Package

tbnl

Source

session.lisp (file)

Function: return-code &optional REPLY

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

Package

tbnl

Source

reply.lisp (file)

Setf Expander

(setf return-code) (setf expander)

Setf Expander: (setf return-code) &optional REPLY

Sets the http return code of REPLY.

Package

tbnl

Source

reply.lisp (file)

Reader

return-code (function)

Function: rfc-1123-date &optional TIME

Generate time string according to RFC 1123. Default is current time.

Package

tbnl

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

tbnl

Source

request.lisp (file)

Function: send-headers ()

Sends the initial status line and all headers as determined by the REPLY object *REPLY*. Returns a 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.

Package

tbnl

Source

modlisp.lisp (file)

Function: server-addr &optional REQUEST

Returns the ’SERVER_ADDR’ header (if sent by the front-end, otherwise the IP address of the TBNL host if available) as captured in the REQUEST object REQUEST.

Package

tbnl

Source

request.lisp (file)

Function: server-port &key REQUEST AS-NUMBER

Returns the IP port where the request came in (if sent by the front-end). If AS-NUMBER-P is true, which is the default, the value is returned as a number.

Package

tbnl

Source

request.lisp (file)

Function: server-protocol &key REQUEST AS-KEYWORD

Returns the ’SERVER_PROTOCOL’ environent value (if sent by the front-end) as captured in the REQUEST object REQUEST. If AS-KEYWORD is true, which is the default, the value will be returned as a keyword like :HTTP/1.0 or :HTTP/1.1.

Package

tbnl

Source

request.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

tbnl

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

tbnl

Source

session.lisp (file)

Reader

session-value (function)

Function: set-cookie NAME &key VALUE EXPIRES PATH DOMAIN SECURE 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

tbnl

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

tbnl

Source

cookie.lisp (file)

Function: ssl-session-id &optional REQUEST

Returns the ’SSL_SESSION_ID’ header (if sent by the front-end) as captured in the REQUEST object REQUEST.

Package

tbnl

Source

request.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

tbnl

Source

session.lisp (file)

Function: start-tbnl ()

Starts listening on port *TBNL-PORT* if needed. Initializes *SESSION-SECRET* if needed. Returns the newly created or already existing listener object.

Package

tbnl

Source

modlisp.lisp (file)

Function: stop-tbnl ()

Stops the object bound to *LISTENER* if it exists.

Package

tbnl

Source

modlisp.lisp (file)

Function: url-decode STRING &optional EXTERNAL-FORMAT

Decode a url-encoded STRING which is assumed to be encoded using the external format EXTERNAL-FORMAT.

Package

tbnl

Source

util.lisp (file)

Function: url-encode STRING &optional EXTERNAL-FORMAT

URL-encodes a string using the external format EXTERNAL-FORMAT.

Package

tbnl

Source

util.lisp (file)

Function: user-agent &optional REQUEST

Returns the ’User-Agent’ incoming http header value captured in the REQUEST object REQUEST.

Package

tbnl

Source

request.lisp (file)


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

5.1.5 Generic functions

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

tbnl

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

tbnl

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-name OBJECT
Package

tbnl

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

tbnl

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

tbnl

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

tbnl

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: dispatch-request DISPATCH-TABLE
Package

tbnl

Methods
Method: dispatch-request DISPATCH-TABLE

Dispatches *REQUEST* based upon rules in the DISPATCH-TABLE. This method provides the default tbnl behavior.

Source

modlisp.lisp (file)

Generic Function: log-message LOG-LEVEL FMT &rest ARGS
Package

tbnl

Source

log.lisp (file)

Methods
Method: log-message LOG-LEVEL FMT &rest ARGS

Sends a formatted message to Apache’s error log when the data gets sent to Apache/mod_lisp. FMT and ARGS are as in FORMAT. LOG-LEVEL is a keyword denoting the corresponding Apache error level. When *USE-APACHE-LOG* is false the message is written to *LOG-FILE* instead.

Generic Function: session-counter OBJECT
Package

tbnl

Methods
Method: session-counter (SESSION session)

The number of times this session has been used.

Source

session.lisp (file)

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

tbnl

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

tbnl

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

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

Source

session.lisp (file)

Generic Function: session-string OBJECT
Package

tbnl

Methods
Method: session-string (SESSION session)

The session strings 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: session-user-agent OBJECT
Package

tbnl

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

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

Source

session.lisp (file)


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

5.2 Internal definitions


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

5.2.1 Constants

Constant: +buffer-length+

Length of buffers used for internal purposes.

Package

tbnl

Source

specials.lisp (file)

Constant: +day-names+

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

Package

tbnl

Source

specials.lisp (file)

Constant: +implementation-link+
Package

tbnl

Source

specials.lisp (file)

Constant: +month-names+

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

Package

tbnl

Source

specials.lisp (file)


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

5.2.2 Special variables

Special Variable: *close-tbnl-stream*

Set this to T if you want to close the TBNL socket each time a request has been handled.

Package

tbnl

Source

specials.lisp (file)

Special Variable: *easy-handler-alist*
Package

tbnl

Source

specials.lisp (file)

Special Variable: *headers-sent*

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

Package

tbnl

Source

specials.lisp (file)

Special Variable: *hyperdoc-base-uri*
Package

tbnl

Source

specials.lisp (file)

Special Variable: *log-file*

The log file to use if *USE-APACHE-LOG* is false.

Package

tbnl

Source

specials.lisp (file)

Special Variable: *log-file-lock*

A lock to prevent two threads from writing to the log file at same time.

Package

tbnl

Source

specials.lisp (file)

Special Variable: *log-file-stream*

The stream corresponding to the log file.

Package

tbnl

Source

specials.lisp (file)

Special Variable: *mime-type-hash*

A hash table which maps file suffixes to MIME types.

Package

tbnl

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

tbnl

Source

mime-types.lisp (file)

Special Variable: *session-data*

All sessions of all users currently using TBNL. An alist where the car is the session’s ID and the cdr is the SESSION object itself.

Package

tbnl

Source

specials.lisp (file)

Special Variable: *session-data-lock*

A lock to prevent two threads from modifying *SESSION-DATA* at the same time.

Package

tbnl

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 use a session).

Package

tbnl

Source

specials.lisp (file)

Special Variable: *session-secret*

A random value that’s used to encode the public session data.

Package

tbnl

Source

specials.lisp (file)

Special Variable: *tbnl-socket-usage-counter*

The number of requests serviced with the current socket.

Package

tbnl

Source

specials.lisp (file)

Special Variable: *tbnl-stream*

The stream representing the socket TBNL is listening on.

Package

tbnl

Source

specials.lisp (file)

Special Variable: *the-random-state*

A fresh random state.

Package

tbnl

Source

specials.lisp (file)

Special Variable: *tmp-files*

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

Package

tbnl

Source

specials.lisp (file)

Special Variable: *use-modlisp-headers*

If this variable is true then outgoing headers are written in a format mod_lisp can understand, otherwise they’re written like plain HTTP headers.

Package

tbnl

Source

specials.lisp (file)


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

5.2.3 Macros

Macro: debug-value VAR EXPR

Evaluates and returns EXPR but also sets VAR to its value if in debug mode.

Package

tbnl

Source

util.lisp (file)

Macro: defconstant* NAME VALUE &optional DOC

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

Package

tbnl

Source

specials.lisp (file)

Macro: defvar-unbound NAME &optional DOC-STRING

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

Package

tbnl

Source

specials.lisp (file)

Macro: handler-case* EXPRESSION &rest CLAUSES

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

Package

tbnl

Source

util.lisp (file)

Macro: ignore-errors* &body BODY

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

Package

tbnl

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

tbnl

Source

util.lisp (file)

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

tbnl

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

tbnl

Source

util.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

tbnl

Source

util.lisp (file)


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

5.2.4 Functions

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

tbnl

Source

html.lisp (file)

Function: address-string ()

Returns a string with information about TBNL and the front-end suitable for inclusion in HTML output.

Package

tbnl

Source

html.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

tbnl

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

tbnl

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

tbnl

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

tbnl

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

tbnl

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

tbnl

Source

easy-handlers.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

tbnl

Source

easy-handlers.lisp (file)

Function: cookie-date UNIVERSAL-TIME

Converts UNIVERSAL-TIME to cookie date format.

Package

tbnl

Source

cookie.lisp (file)

Function: count-session-usage ()

Counts session usage globally and triggers session gc if necessary.

Package

tbnl

Source

session.lisp (file)

Function: create-random-string &optional N BASE

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

Package

tbnl

Source

util.lisp (file)

Function: default-handler ()

The handler that is supposed to serve the request if no other handler is called.

Package

tbnl

Source

html.lisp (file)

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

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

Package

tbnl

Source

session.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

tbnl

Source

util.lisp (file)

Function: get-next-session-id ()

Returns the next sequential session id.

Package

tbnl

Source

session.lisp (file)

Function: get-post-data &optional REQUEST

Reads the posted data from the stream and stores the raw contents in the corresponding slot of the REQUEST object.

Package

tbnl

Source

request.lisp (file)

Function: get-request-data ()

Reads incoming headers and posted content (if any) from the front-end or directly from the HTTP stream via *TBNL-STREAM*. Returns the results as an alist.

Package

tbnl

Source

modlisp.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

tbnl

Source

session.lisp (file)

Function: hyperdoc-lookup SYMBOL TYPE
Package

tbnl

Source

specials.lisp (file)

Function: iso-time &optional TIME

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

Package

tbnl

Source

util.lisp (file)

Function: listen-for-request *TBNL-STREAM* COMMAND-PROCESSOR &rest ARGS

Listens on *TBNL-STREAM* for an incoming request. Packages the command using GET-REQUEST-DATA and passes it to the COMMAND-PROCESSOR function (which is PROCESS-REQUEST). ARGS are ignored. Designed to be called by a KMRCL:LISTENER object.

Package

tbnl

Source

modlisp.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

tbnl

Source

easy-handlers.lisp (file)

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

tbnl

Source

util.lisp (file)

Function: maybe-invoke-debugger CONDITION

Invokes the debugger if *CATCH-ERRORS-P* is true.

Package

tbnl

Source

util.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

tbnl

Source

html.lisp (file)

Function: md5-hex STRING

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

Package

tbnl

Source

util.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

tbnl

Source

mime-types.lisp (file)

Function: octets-to-string OCTETS &optional EXTERNAL-FORMAT

Converts an array of type (UNSIGNED-BYTE 8) to a Lisp string using the external format EXTERNAL-FORMAT.

Package

tbnl

Source

util.lisp (file)

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

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

Package

tbnl

Source

request.lisp (file)

Function: process-request COMMAND

Processes COMMAND as created by GET-REQUEST-DATA using the corresponding user funtion from *DISPATCH-TABLE*. Sets up REPLY, REQUEST, and SESSION objects. Called by LISTEN-FOR-REQUEST.

Package

tbnl

Source

modlisp.lisp (file)

Function: quote-string STRING

Quote string according to RFC 2616’s definition of quoted-string

Package

tbnl

Source

util.lisp (file)

Function: read-http-headers ()

Reads and parses HTTP headers coming from *TBNL-STREAM* and converts them into an alist.

Package

tbnl

Source

modlisp.lisp (file)

Function: read-http-request FIRST-LINE

Reads incoming HTTP request from Araneida or directly from a browser via *TBNL-STREAM*. Assumes the first line is already consumed and in FIRST-LINE. Returns an alist of the headers.

Package

tbnl

Source

modlisp.lisp (file)

Function: remove-session SESSION

Completely removes the SESSION object SESSION from *SESSION-DATA*.

Package

tbnl

Source

session.lisp (file)

Function: reset-session-secret ()

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

Package

tbnl

Source

util.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

tbnl

Source

html.lisp (file)

Function: session-cookie-value &optional SESSION

Returns a string which can be used to safely restore the 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.

Package

tbnl

Source

session.lisp (file)

Function: session-gc ()

Removes sessions from *session-data* which are too old - see SESSION-TOO-OLD-P.

Package

tbnl

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

tbnl

Source

session.lisp (file)

Function: session-verify REQUEST

Tries to get a session identifier from the cookies (or alternatively from the GET parameters) sent by the client. 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.

Package

tbnl

Source

session.lisp (file)

Function: socket-local-host ()
Package

tbnl

Source

util.lisp (file)

Function: socket-local-port ()
Package

tbnl

Source

util.lisp (file)

Function: socket-remote-host ()
Package

tbnl

Source

util.lisp (file)

Function: socket-remote-port ()
Package

tbnl

Source

util.lisp (file)

Function: start-output &optional CONTENT

Sends all headers and maybe the content body to *TBNL-STREAM*. Handles the supported return codes accordingly. Called by PROCESS-REQUEST. Returns the stream to write to.

Package

tbnl

Source

modlisp.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.

Package

tbnl

Source

util.lisp (file)

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

Tests whether the sequence SEQ starts with the sequence SUBSEQ.

Package

tbnl

Source

util.lisp (file)

Function: status-line RETURN-CODE

Returns a meaningful status line for the http return code RETURN-CODE (which should be an integer).

Package

tbnl

Source

util.lisp (file)

Function: string-assoc STRING A-LIST

Returns an entry keyed by the string STRING from A-LIST. The search is case-insensitive.

Package

tbnl

Source

util.lisp (file)

Function: string-assoc* STRING A-LIST

Returns an entry keyed by the string STRING from A-LIST. The search is case-sensitive.

Package

tbnl

Source

util.lisp (file)

Function: string-to-octets STRING &optional EXTERNAL-FORMAT

Converts a Lisp string to an array of type (UNSIGNED-BYTE 8) using the external format EXTERNAL-FORMAT.

Package

tbnl

Source

util.lisp (file)

Function: stringify-session SESSION

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

Package

tbnl

Source

session.lisp (file)

Function: tbnl-info-string ()

Provides parts of the version info depending on *USE-MODLISP-HEADERS* and the presence of :ARANEIDA in *FEATURES*. Can only be called when a request is handled.

Package

tbnl

Source

util.lisp (file)

Function: write-header-line KEY VALUE

Accepts a KEY and a VALUE and writes them, one line at a time, to the mod_lisp or HTTP/Araneida socket stream.

Package

tbnl

Source

modlisp.lisp (file)

Function: write-header-line/http KEY VALUE

Accepts a KEY and a VALUE and writes them, one line at a time, to the http/Araneida socket stream

Package

tbnl

Source

modlisp.lisp (file)

Function: write-header-line/modlisp KEY VALUE

Accepts a KEY and a VALUE and writes them, one line at a time, to the mod_lisp socket stream

Package

tbnl

Source

modlisp.lisp (file)


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

5.2.5 Generic functions

Generic Function: aux-data OBJECT
Generic Function: (setf aux-data) NEW-VALUE OBJECT
Package

tbnl

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: log-messages OBJECT
Package

tbnl

Methods
Method: log-messages (REPLY reply)

A list (in reverse chronological
order) of the messages which are to be written to the Apache error log. This slot’s value should only be modified by the functions defined in log.lisp.

Source

reply.lisp (file)

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

tbnl

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-data OBJECT
Package

tbnl

Methods
Method: session-data (SESSION session)

Data associated with this session - see SESSION-VALUE.

Source

session.lisp (file)

Generic Function: session-id OBJECT
Package

tbnl

Methods
Method: session-id (SESSION session)

The unique ID (an INTEGER) of the session.

Source

session.lisp (file)

Generic Function: session-last-click OBJECT
Package

tbnl

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

The last time this session was used.

Source

session.lisp (file)

Generic Function: session-start OBJECT
Package

tbnl

Methods
Method: session-start (SESSION session)

The time this session was started.

Source

session.lisp (file)

Generic Function: stringify-cookie COOKIE
Package

tbnl

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)


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

5.2.6 Classes

Class: cookie ()

Each COOKIE objects describes one outgoing cookie.

Package

tbnl

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: 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)

Class: reply ()

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

Package

tbnl

Source

reply.lisp (file)

Direct superclasses

standard-object (class)

Direct methods

log-messages (method)

Direct slots
Slot: content-type

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

Initform

tbnl:*default-content-type*

Slot: content-length

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

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.

Slot: return-code

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

Initform

tbnl:+http-ok+

Slot: log-messages

A list (in reverse chronological
order) of the messages which are to be written to the Apache error log. This slot’s value should only be modified by the functions defined in log.lisp.

Readers

log-messages (generic function)

Slot: cookies-out

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

Class: request ()

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

Package

tbnl

Source

request.lisp (file)

Direct superclasses

standard-object (class)

Direct methods
  • initialize-instance (method)
  • aux-data (method)
  • aux-data (method)
  • session (method)
  • session (method)
Direct slots
Slot: headers-in

An alist of the incoming
headers. Note that these might be the headers coming in from mod_lisp which are different from the headers sent by the client.

Initargs

:headers-in

Slot: cookies-in

An alist of the cookies sent by the client.

Slot: get-parameters

An alist of the GET parameters sent by the client.

Slot: post-parameters

An alist of the POST parameters sent by the client.

Slot: script-name

The URI requested by the client without the query string.

Slot: query-string

The query string of this request.

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
TBNL. They should not be created explicitely with MAKE-INSTANCE but implicitely with START-SESSION. Note that SESSION objects can only be created when the special variable *REQUEST* is bound to a REQUEST object.

Package

tbnl

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

(tbnl::get-next-session-id)

Readers

session-id (generic function)

Slot: session-string

The session strings 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

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

Readers

session-user-agent (generic function)

Slot: remote-addr

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

Initform

(tbnl:real-remote-addr tbnl:*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: session-counter

The number of times this session has been used.

Initform

0

Readers

session-counter (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

tbnl:*session-max-time*

Readers

session-max-time (generic function)

Writers

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


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

Appendix A Indexes


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

A.1 Concepts

Jump to:   F   L   T  
Index Entry  Section

F
File, Lisp, tbnl.asd: The tbnl<dot>asd file
File, Lisp, tbnl/araneida.lisp: The tbnl/araneida<dot>lisp file
File, Lisp, tbnl/cookie.lisp: The tbnl/cookie<dot>lisp file
File, Lisp, tbnl/easy-handlers.lisp: The tbnl/easy-handlers<dot>lisp file
File, Lisp, tbnl/html.lisp: The tbnl/html<dot>lisp file
File, Lisp, tbnl/log.lisp: The tbnl/log<dot>lisp file
File, Lisp, tbnl/mime-types.lisp: The tbnl/mime-types<dot>lisp file
File, Lisp, tbnl/modlisp.lisp: The tbnl/modlisp<dot>lisp file
File, Lisp, tbnl/packages.lisp: The tbnl/packages<dot>lisp file
File, Lisp, tbnl/reply.lisp: The tbnl/reply<dot>lisp file
File, Lisp, tbnl/request.lisp: The tbnl/request<dot>lisp file
File, Lisp, tbnl/session.lisp: The tbnl/session<dot>lisp file
File, Lisp, tbnl/specials.lisp: The tbnl/specials<dot>lisp file
File, Lisp, tbnl/util.lisp: The tbnl/util<dot>lisp file

L
Lisp File, tbnl.asd: The tbnl<dot>asd file
Lisp File, tbnl/araneida.lisp: The tbnl/araneida<dot>lisp file
Lisp File, tbnl/cookie.lisp: The tbnl/cookie<dot>lisp file
Lisp File, tbnl/easy-handlers.lisp: The tbnl/easy-handlers<dot>lisp file
Lisp File, tbnl/html.lisp: The tbnl/html<dot>lisp file
Lisp File, tbnl/log.lisp: The tbnl/log<dot>lisp file
Lisp File, tbnl/mime-types.lisp: The tbnl/mime-types<dot>lisp file
Lisp File, tbnl/modlisp.lisp: The tbnl/modlisp<dot>lisp file
Lisp File, tbnl/packages.lisp: The tbnl/packages<dot>lisp file
Lisp File, tbnl/reply.lisp: The tbnl/reply<dot>lisp file
Lisp File, tbnl/request.lisp: The tbnl/request<dot>lisp file
Lisp File, tbnl/session.lisp: The tbnl/session<dot>lisp file
Lisp File, tbnl/specials.lisp: The tbnl/specials<dot>lisp file
Lisp File, tbnl/util.lisp: The tbnl/util<dot>lisp file

T
tbnl.asd: The tbnl<dot>asd file
tbnl/araneida.lisp: The tbnl/araneida<dot>lisp file
tbnl/cookie.lisp: The tbnl/cookie<dot>lisp file
tbnl/easy-handlers.lisp: The tbnl/easy-handlers<dot>lisp file
tbnl/html.lisp: The tbnl/html<dot>lisp file
tbnl/log.lisp: The tbnl/log<dot>lisp file
tbnl/mime-types.lisp: The tbnl/mime-types<dot>lisp file
tbnl/modlisp.lisp: The tbnl/modlisp<dot>lisp file
tbnl/packages.lisp: The tbnl/packages<dot>lisp file
tbnl/reply.lisp: The tbnl/reply<dot>lisp file
tbnl/request.lisp: The tbnl/request<dot>lisp file
tbnl/session.lisp: The tbnl/session<dot>lisp file
tbnl/specials.lisp: The tbnl/specials<dot>lisp file
tbnl/util.lisp: The tbnl/util<dot>lisp file

Jump to:   F   L   T  

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

A.2 Functions

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

(
(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-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 header-out): Exported functions
(setf log-file): Exported functions
(setf return-code): Exported functions
(setf session): Internal generic functions
(setf session): Internal generic functions
(setf session-max-time): Exported generic functions
(setf session-max-time): Exported generic functions
(setf session-value): Exported functions

A
add-cookie-value-to-url: Internal functions
address-string: Internal functions
authorization: Exported functions
aux-data: Internal generic functions
aux-data: Internal generic functions
aux-request-value: Exported functions

C
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
content-length: Exported functions
content-type: Exported 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-in: Exported 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 functions
cookies-out: Exported functions
count-session-usage: 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-static-file-dispatcher-and-handler: Exported functions

D
debug-value: Internal macros
default-dispatcher: Exported functions
default-handler: Internal functions
defconstant*: Internal macros
define-easy-handler: Exported macros
defvar-unbound: Internal macros
delete-aux-request-value: Exported functions
delete-session-value: Exported functions
dispatch-easy-handlers: Exported functions
dispatch-request: Exported generic functions
dispatch-request: Exported generic functions
do-sessions: Exported macros

E
encode-session-string: Internal functions
escape-for-html: Exported functions

F
form-url-encoded-list-to-alist: Internal functions
Function, (setf log-file): Exported functions
Function, add-cookie-value-to-url: Internal functions
Function, address-string: Internal functions
Function, authorization: Exported functions
Function, aux-request-value: Exported 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, content-length: Exported functions
Function, content-type: Exported 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, count-session-usage: 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-dispatcher: Exported functions
Function, default-handler: Internal functions
Function, delete-aux-request-value: Exported functions
Function, delete-session-value: Exported functions
Function, dispatch-easy-handlers: Exported functions
Function, encode-session-string: Internal functions
Function, escape-for-html: Exported functions
Function, form-url-encoded-list-to-alist: Internal functions
Function, get-backtrace: Exported functions
Function, get-next-session-id: Internal functions
Function, get-parameter: Exported functions
Function, get-parameters: Exported 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, headers-in: Exported functions
Function, headers-out: Exported functions
Function, host: Exported functions
Function, http-token-p: Exported functions
Function, hyperdoc-lookup: Internal functions
Function, iso-time: Internal functions
Function, listen-for-request: Internal functions
Function, log-file: Exported functions
Function, log-message*: Exported functions
Function, make-defun-parameter: Internal functions
Function, make-tmp-file-name: Internal functions
Function, maybe-invoke-debugger: Internal functions
Function, maybe-rewrite-urls-for-session: Internal functions
Function, md5-hex: Internal functions
Function, mime-type: Internal functions
Function, mod-lisp-id: Exported functions
Function, no-cache: Exported functions
Function, octets-to-string: Internal functions
Function, parameter: Exported functions
Function, parse-rfc2388-form-data: Internal functions
Function, post-parameter: Exported functions
Function, post-parameters: Exported functions
Function, process-request: Internal functions
Function, query-string: Exported functions
Function, quote-string: Internal functions
Function, raw-post-data: Exported functions
Function, read-from-string*: Exported functions
Function, read-http-headers: Internal functions
Function, read-http-request: Internal functions
Function, real-remote-addr: Exported functions
Function, recompute-request-parameters: Exported functions
Function, redirect: Exported functions
Function, referer: Exported functions
Function, remote-addr: Exported functions
Function, remote-port: Exported functions
Function, remove-session: Internal functions
Function, request-method: Exported functions
Function, request-uri: Exported functions
Function, require-authorization: Exported functions
Function, reset-session-secret: Internal functions
Function, reset-sessions: Exported functions
Function, return-code: Exported functions
Function, rfc-1123-date: Exported functions
Function, scanner-for-get-param: Internal functions
Function, script-name: Exported functions
Function, send-headers: Exported functions
Function, server-addr: Exported functions
Function, server-port: Exported functions
Function, server-protocol: Exported functions
Function, session-cookie-value: Internal functions
Function, session-gc: Internal functions
Function, session-too-old-p: Internal functions
Function, session-value: Exported functions
Function, session-verify: Internal functions
Function, set-cookie: Exported functions
Function, set-cookie*: Exported functions
Function, socket-local-host: Internal functions
Function, socket-local-port: Internal functions
Function, socket-remote-host: Internal functions
Function, socket-remote-port: Internal functions
Function, ssl-session-id: Exported functions
Function, start-output: Internal functions
Function, start-session: Exported functions
Function, start-tbnl: Exported functions
Function, starts-with-one-of-p: Internal functions
Function, starts-with-p: Internal functions
Function, status-line: Internal functions
Function, stop-tbnl: Exported functions
Function, string-assoc: Internal functions
Function, string-assoc*: Internal functions
Function, string-to-octets: Internal functions
Function, stringify-session: Internal functions
Function, tbnl-info-string: Internal functions
Function, url-decode: Exported functions
Function, url-encode: Exported functions
Function, user-agent: Exported functions
Function, write-header-line: Internal functions
Function, write-header-line/http: Internal functions
Function, write-header-line/modlisp: Internal functions

G
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-path): Exported generic functions
Generic Function, (setf cookie-secure): Exported generic functions
Generic Function, (setf cookie-value): Exported generic functions
Generic Function, (setf session): Internal generic functions
Generic Function, (setf session-max-time): Exported generic functions
Generic Function, aux-data: Internal generic functions
Generic Function, cookie-domain: Exported generic functions
Generic Function, cookie-expires: 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, dispatch-request: Exported generic functions
Generic Function, log-message: Exported generic functions
Generic Function, log-messages: Internal generic functions
Generic Function, session: Internal generic functions
Generic Function, session-counter: Exported generic functions
Generic Function, session-data: Internal generic functions
Generic Function, session-id: Internal 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: Internal generic functions
Generic Function, session-string: Exported generic functions
Generic Function, session-user-agent: Exported generic functions
Generic Function, stringify-cookie: Internal generic functions
get-backtrace: Exported functions
get-next-session-id: Internal functions
get-parameter: Exported functions
get-parameters: Exported functions
get-post-data: Internal functions
get-request-data: Internal functions
get-stored-session: Internal functions

H
handle-if-modified-since: Exported functions
handle-static-file: Exported functions
handler-case*: Internal macros
header-in: Exported functions
header-out: Exported functions
headers-in: Exported functions
headers-out: Exported functions
host: Exported functions
http-token-p: Exported functions
hyperdoc-lookup: Internal functions

I
ignore-errors*: Internal macros
iso-time: Internal functions

L
listen-for-request: Internal functions
log-file: Exported functions
log-message: Exported generic functions
log-message: Exported generic functions
log-message*: Exported functions
log-messages: Internal generic functions
log-messages: Internal generic functions

M
Macro, debug-value: Internal macros
Macro, defconstant*: Internal macros
Macro, define-easy-handler: Exported macros
Macro, defvar-unbound: Internal macros
Macro, do-sessions: Exported macros
Macro, handler-case*: Internal macros
Macro, ignore-errors*: Internal macros
Macro, with-debugger: Internal macros
Macro, with-lock-held: Internal macros
Macro, with-rebinding: Internal macros
Macro, with-unique-names: Internal macros
make-defun-parameter: Internal functions
make-tmp-file-name: Internal functions
maybe-invoke-debugger: Internal functions
maybe-rewrite-urls-for-session: Internal functions
md5-hex: Internal 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-path): Exported generic functions
Method, (setf cookie-secure): Exported generic functions
Method, (setf cookie-value): Exported generic functions
Method, (setf session): Internal generic functions
Method, (setf session-max-time): Exported generic functions
Method, aux-data: Internal generic functions
Method, cookie-domain: Exported generic functions
Method, cookie-expires: 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, dispatch-request: Exported generic functions
Method, log-message: Exported generic functions
Method, log-messages: Internal generic functions
Method, session: Internal generic functions
Method, session-counter: Exported generic functions
Method, session-data: Internal generic functions
Method, session-id: Internal generic functions
Method, session-last-click: Internal generic functions
Method, session-max-time: Exported generic functions
Method, session-remote-addr: Exported generic functions
Method, session-start: Internal generic functions
Method, session-string: Exported generic functions
Method, session-user-agent: Exported generic functions
Method, stringify-cookie: Internal generic functions
mime-type: Internal functions
mod-lisp-id: Exported functions

N
no-cache: Exported functions

O
octets-to-string: Internal functions

P
parameter: Exported functions
parse-rfc2388-form-data: Internal functions
post-parameter: Exported functions
post-parameters: Exported functions
process-request: Internal functions

Q
query-string: Exported functions
quote-string: Internal functions

R
raw-post-data: Exported functions
read-from-string*: Exported functions
read-http-headers: Internal functions
read-http-request: Internal functions
real-remote-addr: Exported functions
recompute-request-parameters: Exported functions
redirect: Exported functions
referer: Exported functions
remote-addr: Exported functions
remote-port: Exported functions
remove-session: Internal functions
request-method: Exported functions
request-uri: Exported functions
require-authorization: Exported functions
reset-session-secret: Internal functions
reset-sessions: Exported functions
return-code: Exported functions
rfc-1123-date: Exported functions

S
scanner-for-get-param: Internal functions
script-name: Exported functions
send-headers: Exported functions
server-addr: Exported functions
server-port: Exported functions
server-protocol: Exported functions
session: Internal generic functions
session: Internal generic functions
session-cookie-value: Internal functions
session-counter: Exported generic functions
session-counter: Exported generic functions
session-data: Internal generic functions
session-data: Internal generic functions
session-gc: Internal functions
session-id: Internal generic functions
session-id: Internal generic functions
session-last-click: Internal generic functions
session-last-click: Internal generic functions
session-max-time: Exported generic functions
session-max-time: Exported generic functions
session-remote-addr: Exported generic functions
session-remote-addr: Exported generic functions
session-start: Internal generic functions
session-start: Internal generic functions
session-string: Exported generic functions
session-string: Exported generic functions
session-too-old-p: Internal functions
session-user-agent: Exported generic functions
session-user-agent: Exported generic functions
session-value: Exported functions
session-verify: Internal functions
set-cookie: Exported functions
set-cookie*: Exported functions
Setf Expander, (setf aux-request-value): Exported functions
Setf Expander, (setf content-length): Exported functions
Setf Expander, (setf content-type): Exported functions
Setf Expander, (setf header-out): Exported functions
Setf Expander, (setf return-code): Exported functions
Setf Expander, (setf session-value): Exported functions
socket-local-host: Internal functions
socket-local-port: Internal functions
socket-remote-host: Internal functions
socket-remote-port: Internal functions
ssl-session-id: Exported functions
start-output: Internal functions
start-session: Exported functions
start-tbnl: Exported functions
starts-with-one-of-p: Internal functions
starts-with-p: Internal functions
status-line: Internal functions
stop-tbnl: Exported functions
string-assoc: Internal functions
string-assoc*: Internal functions
string-to-octets: Internal functions
stringify-cookie: Internal generic functions
stringify-cookie: Internal generic functions
stringify-session: Internal functions

T
tbnl-info-string: Internal functions

U
url-decode: Exported functions
url-encode: Exported functions
user-agent: Exported functions

W
with-debugger: Internal macros
with-lock-held: Internal macros
with-rebinding: Internal macros
with-unique-names: Internal macros
write-header-line: Internal functions
write-header-line/http: Internal functions
write-header-line/modlisp: Internal functions

Jump to:   (  
A   C   D   E   F   G   H   I   L   M   N   O   P   Q   R   S   T   U   W  

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

A.3 Variables

Jump to:   *   +  
A   C   D   E   G   H   L   M   N   P   Q   R   S   U   V  
Index Entry  Section

*
*backtrace*: Exported special variables
*body*: Exported special variables
*catch-errors-p*: Exported special variables
*close-tbnl-stream*: Internal special variables
*command*: Exported special variables
*content-types-for-url-rewrite*: Exported special variables
*debug-mode*: Exported special variables
*default-content-type*: Exported special variables
*default-handler*: Exported special variables
*default-log-level*: Exported special variables
*dispatch-table*: Exported special variables
*easy-handler-alist*: Internal special variables
*error*: Exported special variables
*file-upload-hook*: Exported special variables
*headers-sent*: Internal special variables
*http-error-handler*: Exported special variables
*hyperdoc-base-uri*: Internal special variables
*lisp-errors-log-level*: Exported special variables
*lisp-warnings-log-level*: Exported special variables
*listener*: Exported special variables
*log-file*: Internal special variables
*log-file-lock*: Internal special variables
*log-file-stream*: Internal special variables
*log-lisp-backtraces-p*: Exported special variables
*log-lisp-errors-p*: Exported special variables
*log-lisp-warnings-p*: Exported special variables
*log-prefix*: Exported special variables
*mime-type-hash*: Internal special variables
*mime-type-list*: Internal special variables
*reply*: Exported special variables
*request*: Exported special variables
*rewrite-for-session-urls*: Exported special variables
*session*: Exported special variables
*session-cookie-name*: Exported special variables
*session-data*: Internal special variables
*session-data-lock*: Internal special variables
*session-gc-frequency*: Internal special variables
*session-max-time*: Exported special variables
*session-removal-hook*: Exported special variables
*session-secret*: Internal special variables
*show-access-log-messages*: Exported special variables
*show-lisp-backtraces-p*: Exported special variables
*show-lisp-errors-p*: Exported special variables
*tbnl-default-external-format*: Exported special variables
*tbnl-port*: Exported special variables
*tbnl-socket-usage-counter*: Internal special variables
*tbnl-stream*: Internal special variables
*tbnl-version*: Exported special variables
*the-random-state*: Internal special variables
*tmp-directory*: Exported special variables
*tmp-files*: Internal special variables
*use-apache-log*: Exported special variables
*use-modlisp-headers*: Internal special variables
*use-remote-addr-for-sessions*: Exported special variables
*use-user-agent-for-sessions*: Exported special variables

+
+buffer-length+: Internal constants
+day-names+: Internal constants
+http-accepted+: Exported constants
+http-authorization-required+: Exported constants
+http-bad-gateway+: Exported constants
+http-bad-request+: Exported constants
+http-conflict+: Exported constants
+http-continue+: Exported constants
+http-created+: Exported constants
+http-expectation-failed+: Exported constants
+http-forbidden+: Exported constants
+http-gateway-time-out+: Exported constants
+http-gone+: Exported constants
+http-internal-server-error+: Exported constants
+http-length-required+: Exported constants
+http-method-not-allowed+: Exported constants
+http-moved-permanently+: Exported constants
+http-moved-temporarily+: Exported constants
+http-multiple-choices+: Exported constants
+http-no-content+: Exported constants
+http-non-authoritative-information+: Exported constants
+http-not-acceptable+: Exported constants
+http-not-found+: Exported constants
+http-not-implemented+: Exported constants
+http-not-modified+: Exported constants
+http-ok+: Exported constants
+http-partial-content+: Exported constants
+http-payment-required+: Exported constants
+http-precondition-failed+: Exported constants
+http-proxy-authentication-required+: Exported constants
+http-request-entity-too-large+: Exported constants
+http-request-time-out+: Exported constants
+http-request-uri-too-large+: Exported constants
+http-requested-range-not-satisfiable+: Exported constants
+http-reset-content+: Exported constants
+http-see-other+: Exported constants
+http-service-unavailable+: Exported constants
+http-switching-protocols+: Exported constants
+http-temporary-redirect+: Exported constants
+http-unsupported-media-type+: Exported constants
+http-use-proxy+: Exported constants
+http-version-not-supported+: Exported constants
+implementation-link+: Internal constants
+latin-1+: Exported constants
+month-names+: Internal constants
+utf-8+: Exported constants

A
aux-data: Internal classes

C
Constant, +buffer-length+: Internal constants
Constant, +day-names+: Internal constants
Constant, +http-accepted+: Exported constants
Constant, +http-authorization-required+: Exported constants
Constant, +http-bad-gateway+: Exported constants
Constant, +http-bad-request+: Exported constants
Constant, +http-conflict+: Exported constants
Constant, +http-continue+: Exported constants
Constant, +http-created+: Exported constants
Constant, +http-expectation-failed+: Exported constants
Constant, +http-forbidden+: Exported constants
Constant, +http-gateway-time-out+: Exported constants
Constant, +http-gone+: Exported constants
Constant, +http-internal-server-error+: Exported constants
Constant, +http-length-required+: Exported constants
Constant, +http-method-not-allowed+: Exported constants
Constant, +http-moved-permanently+: Exported constants
Constant, +http-moved-temporarily+: Exported constants
Constant, +http-multiple-choices+: Exported constants
Constant, +http-no-content+: Exported constants
Constant, +http-non-authoritative-information+: Exported constants
Constant, +http-not-acceptable+: Exported constants
Constant, +http-not-found+: Exported constants
Constant, +http-not-implemented+: Exported constants
Constant, +http-not-modified+: Exported constants
Constant, +http-ok+: Exported constants
Constant, +http-partial-content+: Exported constants
Constant, +http-payment-required+: Exported constants
Constant, +http-precondition-failed+: Exported constants
Constant, +http-proxy-authentication-required+: Exported constants
Constant, +http-request-entity-too-large+: Exported constants
Constant, +http-request-time-out+: Exported constants
Constant, +http-request-uri-too-large+: Exported constants
Constant, +http-requested-range-not-satisfiable+: Exported constants
Constant, +http-reset-content+: Exported constants
Constant, +http-see-other+: Exported constants
Constant, +http-service-unavailable+: Exported constants
Constant, +http-switching-protocols+: Exported constants
Constant, +http-temporary-redirect+: Exported constants
Constant, +http-unsupported-media-type+: Exported constants
Constant, +http-use-proxy+: Exported constants
Constant, +http-version-not-supported+: Exported constants
Constant, +implementation-link+: Internal constants
Constant, +latin-1+: Exported constants
Constant, +month-names+: Internal constants
Constant, +utf-8+: Exported constants
content-length: Internal classes
content-type: Internal classes
cookies-in: Internal classes
cookies-out: Internal classes

D
domain: Internal classes

E
expires: Internal classes

G
get-parameters: Internal classes

H
headers-in: Internal classes
headers-out: Internal classes

L
last-click: Internal classes
log-messages: Internal classes

M
max-time: Internal classes

N
name: Internal classes

P
path: Internal classes
post-parameters: Internal classes

Q
query-string: Internal classes

R
raw-post-data: Internal classes
remote-addr: Internal classes
return-code: Internal classes

S
script-name: Internal classes
secure: Internal classes
session: Internal classes
session-counter: Internal classes
session-data: Internal classes
session-id: Internal classes
session-start: Internal classes
session-string: Internal classes
Slot, aux-data: Internal classes
Slot, content-length: Internal classes
Slot, content-type: Internal classes
Slot, cookies-in: Internal classes
Slot, cookies-out: Internal classes
Slot, domain: Internal classes
Slot, expires: Internal classes
Slot, get-parameters: Internal classes
Slot, headers-in: Internal classes
Slot, headers-out: Internal classes
Slot, last-click: Internal classes
Slot, log-messages: Internal classes
Slot, max-time: Internal classes
Slot, name: Internal classes
Slot, path: Internal classes
Slot, post-parameters: Internal classes
Slot, query-string: Internal classes
Slot, raw-post-data: Internal classes
Slot, remote-addr: Internal classes
Slot, return-code: Internal classes
Slot, script-name: Internal classes
Slot, secure: Internal classes
Slot, session: Internal classes
Slot, session-counter: Internal classes
Slot, session-data: Internal classes
Slot, session-id: Internal classes
Slot, session-start: Internal classes
Slot, session-string: Internal classes
Slot, user-agent: Internal classes
Slot, value: Internal classes
Special Variable, *backtrace*: Exported special variables
Special Variable, *body*: Exported special variables
Special Variable, *catch-errors-p*: Exported special variables
Special Variable, *close-tbnl-stream*: Internal special variables
Special Variable, *command*: Exported special variables
Special Variable, *content-types-for-url-rewrite*: Exported special variables
Special Variable, *debug-mode*: Exported special variables
Special Variable, *default-content-type*: Exported special variables
Special Variable, *default-handler*: Exported special variables
Special Variable, *default-log-level*: Exported special variables
Special Variable, *dispatch-table*: Exported special variables
Special Variable, *easy-handler-alist*: Internal special variables
Special Variable, *error*: Exported special variables
Special Variable, *file-upload-hook*: Exported special variables
Special Variable, *headers-sent*: Internal special variables
Special Variable, *http-error-handler*: Exported special variables
Special Variable, *hyperdoc-base-uri*: Internal special variables
Special Variable, *lisp-errors-log-level*: Exported special variables
Special Variable, *lisp-warnings-log-level*: Exported special variables
Special Variable, *listener*: Exported special variables
Special Variable, *log-file*: Internal special variables
Special Variable, *log-file-lock*: Internal special variables
Special Variable, *log-file-stream*: Internal special variables
Special Variable, *log-lisp-backtraces-p*: Exported special variables
Special Variable, *log-lisp-errors-p*: Exported special variables
Special Variable, *log-lisp-warnings-p*: Exported special variables
Special Variable, *log-prefix*: Exported special variables
Special Variable, *mime-type-hash*: Internal special variables
Special Variable, *mime-type-list*: Internal special variables
Special Variable, *reply*: Exported special variables
Special Variable, *request*: Exported special variables
Special Variable, *rewrite-for-session-urls*: Exported special variables
Special Variable, *session*: Exported special variables
Special Variable, *session-cookie-name*: Exported special variables
Special Variable, *session-data*: Internal special variables
Special Variable, *session-data-lock*: Internal special variables
Special Variable, *session-gc-frequency*: Internal special variables
Special Variable, *session-max-time*: Exported special variables
Special Variable, *session-removal-hook*: Exported special variables
Special Variable, *session-secret*: Internal special variables
Special Variable, *show-access-log-messages*: Exported special variables
Special Variable, *show-lisp-backtraces-p*: Exported special variables
Special Variable, *show-lisp-errors-p*: Exported special variables
Special Variable, *tbnl-default-external-format*: Exported special variables
Special Variable, *tbnl-port*: Exported special variables
Special Variable, *tbnl-socket-usage-counter*: Internal special variables
Special Variable, *tbnl-stream*: Internal special variables
Special Variable, *tbnl-version*: Exported special variables
Special Variable, *the-random-state*: Internal special variables
Special Variable, *tmp-directory*: Exported special variables
Special Variable, *tmp-files*: Internal special variables
Special Variable, *use-apache-log*: Exported special variables
Special Variable, *use-modlisp-headers*: Internal special variables
Special Variable, *use-remote-addr-for-sessions*: Exported special variables
Special Variable, *use-user-agent-for-sessions*: Exported special variables

U
user-agent: Internal classes

V
value: Internal classes

Jump to:   *   +  
A   C   D   E   G   H   L   M   N   P   Q   R   S   U   V  

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

A.4 Data types

Jump to:   C   P   R   S   T  
Index Entry  Section

C
Class, cookie: Internal classes
Class, reply: Internal classes
Class, request: Internal classes
Class, session: Internal classes
cookie: Internal classes

P
Package, tbnl: The tbnl package
Package, tbnl-asd: The tbnl-asd package
Package, tbnl-contrib: The tbnl-contrib package
Package, tbnl-dummy: The tbnl-dummy package

R
reply: Internal classes
request: Internal classes

S
session: Internal classes
System, tbnl: The tbnl system

T
tbnl: The tbnl system
tbnl: The tbnl package
tbnl-asd: The tbnl-asd package
tbnl-contrib: The tbnl-contrib package
tbnl-dummy: The tbnl-dummy package

Jump to:   C   P   R   S   T