Manual section: | 3 |
---|
import std [from "path"] ;
Vmod_std contains basic functions which are part and parcel of Varnish, but which for reasons of architecture fit better in a VMOD.
One particular class of functions in vmod_std is the conversions functions which all have the form:
TYPE type(STRING, TYPE)
These functions attempt to convert STRING to the TYPE, and if that fails, they return the second argument, which must have the given TYPE.
std.collect(req.http.cookie);
This will collapse several Cookie: headers into one, long cookie header.
Cache the req.body if it is smaller than size.
Caching the req.body makes it possible to retry pass operations (POST, PUT).
std.cache_req_body(1KB);
This will cache the req.body if its size is smaller than 1KB.
Returns the first occurrence of the string s2 in the string s1, or an empty string if not found.
Note that the comparison is case sensitive.
Converts the string s to a time. If conversion fails, fallback will be returned.
Supported formats:
The Varnish standard module was released along with Varnish Cache 3.0. This manual page was written by Per Buer with help from Martin Blix Grydeland.
This document is licensed under the same licence as Varnish itself. See LICENCE for details.