From: Fredrik Tolf Date: Tue, 13 Dec 2011 02:54:09 +0000 (+0100) Subject: doc: Documented the `set' directives for {pat,dir}plex. X-Git-Tag: 0.10~11 X-Git-Url: http://www.dolda2000.com/gitweb/?p=ashd.git;a=commitdiff_plain;h=77a840e52bd16bdcfffec75cb5e7f4a2315d7cf5 doc: Documented the `set' directives for {pat,dir}plex. --- diff --git a/doc/dirplex.doc b/doc/dirplex.doc index e4c3b3e..9f3aab2 100644 --- a/doc/dirplex.doc +++ b/doc/dirplex.doc @@ -261,6 +261,15 @@ following actions are recognized: by a *fchild* stanza. This action exists mostly for convenience. +A *match* stanza may also contain any number of *set* lines, as +follows: + +*set* 'HEADER' 'VALUE':: + + If the *match* stanza is selected as the match for a file, the + named HTTP 'HEADER' in the request is set to 'VALUE' before + passing the request on to the specified handler. + 404 RESPONSES ------------- diff --git a/doc/patplex.doc b/doc/patplex.doc index 2d9acbd..d2ee009 100644 --- a/doc/patplex.doc +++ b/doc/patplex.doc @@ -101,14 +101,23 @@ only the *handler* action is recognized: 'HANDLER' must be a named handler as declared by a *child* or *fchild* stanza, to which the request is passed. -Additionally, a *match* stanza may contain a *restpat* line: +Additionally, a *match* stanza may contain any of the following, +optional lines: + +*set* 'HEADER' 'VALUE':: + + If the *match* stanza as a whole matches, the named HTTP + 'HEADER' in the request is set to 'VALUE' before passing the + request on to the specified handler. A *match* stanza may + contain any number of *set* lines. *restpat* 'TEMPLATE':: If the *match* stanza as a whole matches, 'TEMPLATE' is expanded and installed as the rest string of the request before it is passed to the specified handler. In 'TEMPLATE', - the following parameters are recognized and expanded. + the following parameters are recognized and expanded. At most + one *restpat* line may be given per *match* stanza. *$0* ... *$9*::