[master] 84e98d8 Improve documentation for std.collect

Dridi Boukelmoune dridi.boukelmoune at gmail.com
Fri Mar 31 14:25:08 CEST 2017


commit 84e98d8d0d5c922805bcd47e29a48580d026fc22
Author: Dridi Boukelmoune <dridi.boukelmoune at gmail.com>
Date:   Fri Mar 31 09:12:27 2017 +0200

    Improve documentation for std.collect

diff --git a/lib/libvmod_std/vmod.vcc b/lib/libvmod_std/vmod.vcc
index d4a4381..2ebfb45 100644
--- a/lib/libvmod_std/vmod.vcc
+++ b/lib/libvmod_std/vmod.vcc
@@ -110,16 +110,17 @@ Example
 $Function VOID collect(HEADER hdr, STRING sep=", ")
 
 Description
-	Collapses multiple *hdr* headers into one long header.
-	The header values are joined with a comma (",") unless a
-	different separator is specified.
+	Collapses multiple *hdr* headers into one long header. The
+	default separator *sep* is the standard comma separator to
+	use when collapsing headers, with an additional  whitespace
+	for pretty printing.
 
 	Care should be taken when collapsing headers. In particular
 	collapsing Set-Cookie will lead to unexpected results on the
 	browser side.
 Examples
-	std.collect(req.http.accept);
-	std.collect(req.http.cookie, "; ");
+	| std.collect(req.http.accept);
+	| std.collect(req.http.cookie, "; ");
 
 $Function DURATION duration(STRING s, DURATION fallback)
 



More information about the varnish-commit mailing list