summaryrefslogtreecommitdiff
path: root/doc/plugins.txt
diff options
context:
space:
mode:
Diffstat (limited to 'doc/plugins.txt')
-rw-r--r--doc/plugins.txt88
1 files changed, 44 insertions, 44 deletions
diff --git a/doc/plugins.txt b/doc/plugins.txt
index 22dee40..91c81fd 100644
--- a/doc/plugins.txt
+++ b/doc/plugins.txt
@@ -13,23 +13,23 @@ Module: core
:abstract:
The plugin interface is an integral part of lighttpd which
provides a flexible way to add specific functionality to lighttpd.
-
+
.. meta::
:keywords: lighttpd, plugins
-
+
.. contents:: Table of Contents
Description
===========
Plugins allow you to enhance the functionality of lighttpd without
-changing the core of the webserver. They can be loaded at startup time
+changing the core of the webserver. They can be loaded at startup time
and can change virtually any aspect of the behaviour of the webserver.
Plugin Entry Points
-------------------
-lighttpd has 16 hooks which are used in different states of the
+lighttpd has 16 hooks which are used in different states of the
execution of the request:
Serverwide hooks
@@ -49,7 +49,7 @@ Serverwide hooks
Connectionwide hooks
````````````````````
-Most of these hooks are called in ``http_response_prepare()`` after some
+Most of these hooks are called in ``http_response_prepare()`` after some
fields in the connection structure are set.
:handle_uri_raw_:
@@ -57,13 +57,13 @@ fields in the connection structure are set.
:handle_uri_clean_:
called after uri.path (a clean URI without .. and %20) is set
:handle_docroot_:
- called at the end of the logical path handle to get a docroot
+ called at the end of the logical path handle to get a docroot
:handle_subrequest_start_:
called if the physical path is set up and checked
:handle_subrequest_:
called at the end of ``http_response_prepare()``
:handle_physical_path_:
- called after the physical path is created and no other handler is
+ called after the physical path is created and no other handler is
found for this request
:handle_request_done_:
called when the request is done
@@ -73,7 +73,7 @@ fields in the connection structure are set.
called after the connection_state_engine is left again and plugin
internal handles have to be called
:connection_reset_:
- called if the connection structure has to be cleaned up
+ called if the connection structure has to be cleaned up
Plugin Interface
@@ -82,14 +82,14 @@ Plugin Interface
\*_plugin_init
``````````````
-Every plugin has a uniquely-named function which is called after the
-plugin is loaded. It is used to set up the ``plugin`` structure with
+Every plugin has a uniquely-named function which is called after the
+plugin is loaded. It is used to set up the ``plugin`` structure with
some useful data:
- name of the plugin ``name``
-- all hooks
+- all hooks
-The field ``data`` and ``lib`` should not be touched in the init function.
+The field ``data`` and ``lib`` should not be touched in the init function.
``lib`` is the library handler from dlopen and ``data`` will be the storage
of the internal plugin data.
@@ -99,9 +99,9 @@ of the internal plugin data.
init
````
-The first real call of a plugin function is the init hook which is used
-to set up the internal plugin data. The internal plugin is assigned the
-``data`` field mentioned in the \*_plugin_init description.
+The first real call of a plugin function is the init hook which is used
+to set up the internal plugin data. The internal plugin is assigned the
+``data`` field mentioned in the \*_plugin_init description.
:returns:
a pointer to the internal plugin data.
@@ -109,7 +109,7 @@ to set up the internal plugin data. The internal plugin is assigned the
cleanup
```````
-The cleanup hook is called just before the plugin is unloaded. It is meant
+The cleanup hook is called just before the plugin is unloaded. It is meant
to free all buffers allocated in ``init`` or somewhere else in the plugin
which are still not freed and to close all handles which were opened and
are not closed yet.
@@ -120,16 +120,16 @@ are not closed yet.
set_defaults
````````````
-set_defaults is your entry point into the configfile parsing. It should
+set_defaults is your entry point into the configfile parsing. It should
pass a list of options to ``config_insert_values`` and check if
-the plugin configuration is valid. If it is not valid yet, it should
+the plugin configuration is valid. If it is not valid yet, it should
set useful defaults or return with HANDLER_ERROR and an error message.
:returns:
HANDLER_GO_ON if ok
-
+
HANDLER_ERROR will terminate lighttpd
-
+
connection_reset
````````````````
@@ -137,9 +137,9 @@ called at the end of each request
:returns:
HANDLER_GO_ON if ok
-
+
HANDLER_ERROR on error
-
+
handle_trigger
``````````````
@@ -147,9 +147,9 @@ called once a second
:returns:
HANDLER_GO_ON if ok
-
+
HANDLER_ERROR on error
-
+
handle_sighup
`````````````
@@ -157,9 +157,9 @@ called if a SIGHUP is received (cycling logfiles, ...)
:returns:
HANDLER_GO_ON if ok
-
+
HANDLER_ERROR on error
-
+
handle_uri_raw
``````````````
@@ -168,9 +168,9 @@ called after uri_raw is set
:returns:
HANDLER_GO_ON if ok
HANDLER_FINISHED if the final output is prepared
-
+
HANDLER_ERROR on error
-
+
handle_uri_clean
````````````````
@@ -179,9 +179,9 @@ called after uri.path is set
:returns:
HANDLER_GO_ON if ok
HANDLER_FINISHED if the final output is prepared
-
+
HANDLER_ERROR on error
-
+
handle_docroot
``````````````
@@ -190,9 +190,9 @@ called when a docroot is needed
:returns:
HANDLER_GO_ON if ok
HANDLER_FINISHED if the final output is prepared
-
+
HANDLER_ERROR on error
-
+
handle_subrequest_start
```````````````````````
@@ -201,9 +201,9 @@ called after physical.path is set
:returns:
HANDLER_GO_ON if ok
HANDLER_FINISHED if the final output is prepared
-
+
HANDLER_ERROR on error
-
+
handle_subrequest
`````````````````
@@ -212,9 +212,9 @@ called if subrequest_start requested a COMEBACK or a WAIT_FOR_EVENT
:returns:
HANDLER_GO_ON if ok
HANDLER_FINISHED if the final output is prepared
-
+
HANDLER_ERROR on error
-
+
handle_physical_path
````````````````````
@@ -223,9 +223,9 @@ called after physical.path is set
:returns:
HANDLER_GO_ON if ok
HANDLER_FINISHED if the final output is prepared
-
+
HANDLER_ERROR on error
-
+
handle_request_done
```````````````````
@@ -234,9 +234,9 @@ called at the end of the request (logging, statistics, ...)
:returns:
HANDLER_GO_ON if ok
-
+
HANDLER_ERROR on error
-
+
handle_connection_close
```````````````````````
@@ -244,9 +244,9 @@ called if the connection is terminated
:returns:
HANDLER_GO_ON if ok
-
+
HANDLER_ERROR on error
-
+
handle_joblist
``````````````
@@ -254,7 +254,7 @@ called if the state of the connection has changed
:returns:
HANDLER_GO_ON if ok
-
+
HANDLER_ERROR on error
-
+