# Change log for Varnish 1.1.2

## Changes between 1.1.1 and 1.1.2

### varnishd

- When switching to a new VCL configuration, a race condition exists which may cause Varnish to reference a backend which no longer exists (see ticket #144). This race condition has not been entirely eliminated, but it should occur less frequently.

- When dropping a TCP session before any requests were processed, an assertion would be triggered due to an uninitialized timestamp (see ticket #132). The timestamp is now correctly initialized.

- Varnish will now correctly generate a Date: header for every response instead of copying the one it got from the backend (see ticket #157).

- Comparisons in VCL which involve a non-existent string (usually a header which is not present in the request or object being processed) would cause a NULL pointer dereference; now the comparison will simply fail.

- A bug in the VCL compiler which would cause a double-free when processing include directives has been fixed.

- A resource leak in the worker thread management code has been fixed.

- When connecting to a backend, Varnish will usually get the address from a cache. When the cache is refreshed, existing connections may end up with a reference to an address structure which no longer exists, resulting in a crash. This race condition has been somewhat mitigated, but not entirely eliminated (see ticket #144.)

- Varnish will now pass the correct protocol version in pipe mode: the backend will get what the client sent, and vice versa.

- The core of the pipe mode code has been rewritten to increase robustness and eliminate spurious error messages when either end closes the connection in a manner Varnish did not anticipate.

- A memory leak in the backend code has been plugged.

- When using the kqueue acceptor, if a client shuts down the request side of the connection (as many clients do after sending their final request), it was possible for the acceptor code to receive the EOF event and recycle the session while the last request was still being serviced, resulting in a assertion failure and a crash when the worker thread later tried to delete the session. This should no longer happen (see ticket #162.)

- A mismatch between the recorded length of a cached object and the amount of data actually present in cache for that object can occasionally occur (see ticket #167.) This has been partially fixed, but may still occur for error pages generated by Varnish when a problem arises while retrieving an object from the backend.

- Some socket-related system calls may return unexpected error codes when operating on a TCP connection that has been shut down at the other end. These error codes would previously cause assertion failures, but are now recognized as harmless conditions.

### varnishhist

- Pressing 0 though 9 while varnishhist is running will change the refresh interval to the corresponding power of two, in seconds.

### varnishncsa

- The varnishncsa tool can now daemonize and write a PID file like varnishlog, using the same command-line options. It will also reopen its output upon receipt of a SIGHUP if invoked with -w.

### varnishstat

- Pressing 0 though 9 while varnishstat is running will change the refresh interval to the corresponding power of two, in seconds.

### Build system

- Varnish's <queue.h> has been modified to avoid conflicts with <sys/queue.h> on platforms where the latter is included indirectly through system headers.

- Several steps have been taken towards Solaris support, but this is not yet complete.

- When configure was run without an explicit prefix, Varnish's idea of the default state directory would be garbage and a state directory would have to be specified manually with -n. This has been corrected.