• Geoff Simmons's avatar
    Extend .matched(), and invoke VCL failure for more error conditions. · 11ac404d
    Geoff Simmons authored
    VCL failure is invoked if:
    - no entries were added to a set
    - a set was not compiled
    - .compile() is called in a VCL sub other than vcl_init
    - a numeric index is out of range (larger than nmembers)
    - the conditions for UNIQUE or EXACT fail
    - associated data to be retrieved (string, backend etc) was not added
    
    If .match() or .hasprefix() are called with a NULL subject, it is
    logged using tag Notice, but is not an error (return value is false).
    This is because it may or may not be intentional to attempt a match
    against an unset header.
    
    The .matched() method now may have a select argument, and works
    similarly to other methods with the f(INT n, ENUM select) signature,
    except that it returns false when the select condition fails, but
    does not invoke VCL failure. This makes it possible to check if
    UNIQUE or EXACT may be used, and avoid VCL failure if desired.
    11ac404d
Name
Last commit
Last update
m4 Loading commit data...
pkg/rpm Loading commit data...
src Loading commit data...
.dir-locals.el Loading commit data...
.gitignore Loading commit data...
CONTRIBUTING.rst Loading commit data...
COPYING Loading commit data...
INSTALL.rst Loading commit data...
LICENSE Loading commit data...
Makefile.am Loading commit data...
README.rst Loading commit data...
TODO Loading commit data...
autogen.sh Loading commit data...
configure.ac Loading commit data...