# Change log for Varnish 2.0.3

## Changes between 2.0.2 and 2.0.3

### varnishd

- Handle If-Modified-Since and ESI sub-objects better, fixing a problem where we sometimes neglected to insert included objects.

- restart in vcl_hit is now supported.

- Setting the TTL of an object to 0 seconds would sometimes cause it to be delivered for up to one second - epsilon. This has been corrected and we should now never deliver those objects to other clients.

- The malloc storage backend now prints the maximum storage size, just like the file backend.

- Various small documentation bugs have been fixed.

- Varnish did not set a default interval for backend probes, causing it to poll the backend continuously. This has been corrected.

- Allow "true" and "false" when setting boolean parameters, in addition to on/off, enable/disable and yes/no.

- Default to always talking HTTP 1.1 with the backend.

- Varnish did not make sure the file it was loading was a regular file. This could cause Varnish to crash if it was asked to load a directory or other non-regular file. We now check that the file is a regular file before loading it.

- The binary heap used for expiry processing had scalability problems. Work around this by using stripes of a fixed size, which should make this scale better, particularly when starting up and having lots of objects.

- When we imported the jemalloc library into the Varnish tree, it did not compile without warnings. This has now been fixed.

- Varnish took a very long time to detect that the backend did not respond. To remedy this, we now have read timeouts in addition to the connect timeout. Both the first_byte_timeout and the between_bytes_timeout defaults to 60 seconds. The connect timeout is no longer in milliseconds, but rather in seconds.

- Previously, the VCL to C conversion as well as the invocation of the C compiler was done in the management process. This is now done in a separate sub-process. This prevents any bugs in the VCL compiler from affecting the management process.

- Chunked encoding headers were counted in the statistics for header bytes. They no longer are.

- ESI processed objects were not counted in the statistics for body bytes. They now are.

- It is now possible to adjust the maximum record length of log entries in the shmlog by tuning the shm_reclen parameter.

- The management parameters listed in the CLI were not sorted, which made it hard to find the parameter you were looking for. They are now sorted, which should make this easier.

- Add a new hashing type, "critbit", which uses a lock-less tree based lookup algorithm. This is experimental and should not be enabled in production environments without proper testing.

- The session workspace had a default size of 8k. It is now 16k, which should make VCLs where many headers are processed less prone to panics.

- We have seen that people seem to be confused as to which actions in the different VCL functions return and which ones don't. Add a new syntax return(action) to make this more explicit. The old syntax is still supported.

- Varnish would return an error if any of the management IPs listed in the -T parameter could not be listened to. We now only return an error if none of them can be listened to.

- In the case of the backend or client giving us too many parameters, we used to just ignore the overflowing headers. This is problematic if you end up ignoreing Content-Length, Transfer-Encoding and similar headers. We now give out a 400 error to the client if it sends us too many and 503 if we get too many from the backend.

- We used panic if we got a too large chunked header. This behaviour has been changed into just failing the transaction.

- Varnish now supports an extended purge method where it is possible to do purge req.http.host ~ "web1.com" && req.url ~ "\.png" and similar. See the documentation for details.

- Under heavy load, Varnish would sometimes crash when trying to update the per-request statistics. This has now been fixed.

- It is now possible to not save the hash string in the session and object workspace. This will save a lot of memory on sites with many small objects. Disabling the purge_hash parameter also disables the purge.hash facility.

- Varnish now supports !~ as a "no match" regular expression matcher.

- In some cases, you could get serialised access to "pass" objects. We now make it default to the default_ttl value; this can be overridden in vcl_fetch.

- Varnish did not check the syntax of regsub calls properly. More checking has been added.

- If the client closed the connection while Varnish was processing ESI elements, Varnish would crash while trying to write the object to the client. We now check if the client has closed the connection.

- The ESI parser had a bug where it would crash if an XML comment would span storage segments. This has been fixed.

### VCL Manual page

- The documentation on how capturing parentheses work was wrong. This has been corrected.

- Grace has now been documented.

### varnishreplay

- varnishreplay did not work correctly on Linux, due to a too small stack. This has now been fixed.