Monthly Archives: September 2011

Sample of string concatenation in Varnish 2.1.5

In Varnish 2.1.5, to concatenate, separate your variables by a space character :

set req.url = regsub(req.http.host, "(?:www\.)?(.*)\.test\.com", "/\1" ) regsub(req.url, "^/foo(.*)$", "\1");

If ( req.http.host == “www.blabla.test.com” ) and ( req.url == “/foo/index.php?a=1″ ) Then req.url = “/blabla/index.php?a=1″

Since Varnish 3.0, the string concatenation operator is +.
Example:

set req.url = regsub(req.http.host, "(?:www\.)?(.*)\.test\.com", "/\1" ) + regsub(req.url, "^/foo(.*)$", "\1");

Varnish 3.0.1 released

Summary of changes from 3.0.0 to 3.0.1

  • Objects with grace and keep set were mistakenly seen as candidates for the shortlived storage, but would not be cleaned up quickly, something that manifested as if there was a memory leak. This is now fixed.
  • When multiple clients were waiting for an object, all clients would be woken up when an object became available, leading to stuck threads. This has now been fixed.
  • A bug in how XML entities were handled with ESI has been fixed.
  • The documentation has seen numerous updates.
  • varnishncsa is now more stable and has support for showing arbitrary request and response fields.

Download here.