summaryrefslogtreecommitdiffabout
path: root/doc/vmod-dbrw.3
Side-by-side diff
Diffstat (limited to 'doc/vmod-dbrw.3') (more/less context) (ignore whitespace changes)
-rw-r--r--doc/vmod-dbrw.324
1 files changed, 22 insertions, 2 deletions
diff --git a/doc/vmod-dbrw.3 b/doc/vmod-dbrw.3
index 2abef65..9bec008 100644
--- a/doc/vmod-dbrw.3
+++ b/doc/vmod-dbrw.3
@@ -10,13 +10,13 @@
.\" but WITHOUT ANY WARRANTY; without even the implied warranty of
.\" MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
.\" GNU General Public License for more details.
.\"
.\" You should have received a copy of the GNU General Public License
.\" along with vmod-dbrw. If not, see <http://www.gnu.org/licenses/>.
-.TH VMOD-DBRW 3 "December 8, 2018" "VMOD-DBRW" "User Reference"
+.TH VMOD-DBRW 3 "February 13, 2019" "VMOD-DBRW" "User Reference"
.SH NAME
vmod-dbrw \- Database-driven rewrite rules for Varnish Cache
.SH SYNOPSIS
.B import dbrw;
.PP
.BI "VOID dbrw.config(STRING " dbtype ", STRING " params ", STRING " query ");"
@@ -187,29 +187,49 @@ modify regular expression handling. The following flags are defined:
.BR NC " or " nocase
Treat \fBregexp\fR as case-insensitive.
.TP
.B case
Treat \fBregexp\fR as case-sensitive (default).
.TP
+.B eq
+Use exact string matching.
+.TP
.BR QSA " or " qsappend
Treat the resulting value as URL; append any query string from the
original \fBvalue\fR to it.
.TP
.BR QSD " or " qsdiscard
Treat the resulting value as URL; discard any query string attached to
the original \fBvalue\fR.
.TP
\fBredirect=\fICODE\fR or \fBR=\fICODE\fR
On success, set the \fBX\-VMOD\-DBRW\-Status\fR header to \fICODE\fR,
-which must be a valid HTTP status code.
+which must be a valid HTTP status code.
+.TP
+.B regex
+Use regular expression matching. This is the default. This flag is
+provided for completeness sake, as a counterpart of
+.BR eq .
.PP
If \fBregexp\fR or \fBvalue\fR is NULL, the tuple is handled as
described in
.BR "Strict matches" .
.PP
If \fBflags\fR is NULL, it is ignored.
+.SH HTTP HEADERS
+Upon return,
+.B dbrw.return
+may set one of the following headers in
+.BR resp.http :
+.TP
+.B X\-VMOD\-DBRW\-Status
+If the \fBredirect\fR flag was used, this header contains the HTTP
+response code to be used instead of the default.
+.TP
+.B X\-VMOD\-DBRW\-Error
+This header is set to \fB1\fR if an error occurred during the rewrite.
.SH EXAMPLES
The examples in this section assume \fBMySQL\fR databases. Any
details not related to \fBvmod-dbrw\fR are omitted.
.SS Redirects
.PP
This example shows how to implement apache-style permanent redirects

Return to:

Send suggestions and report system problems to the System administrator.