Version bump.
Core: removed GLOB_NOSORT glob option.

This will result in alphabetical sorting of included files if
the "include" directive with wildcards is used.

Note that the behaviour is now different from that on Windows, where
alphabetical sorting is not guaranteed for FindFirsFile()/FindNextFile()
(used to be alphabetical on NTFS, but not on FAT).

Approved by Igor Sysoev, prodded by many.
Fixed the NGX_SOCKADDR_STRLEN macro definition.

The ngx_sock_ntop() function, when told to print both address and port,
prints IPv6 address in square brackets, followed by colon and port.
Fixed build with embedded perl in certain setups (ticket #48).
Xslt: prevented infinite loop.

If XSLT transformation failed and error 500 was handled in the same
location, an infinite loop occured that exhausted the stack.
Allow the complex value to be defined as an empty string.

This makes conversion from strings to complex values possible
without the loss of functionality.
The "auth_basic" directive gained support of variables.
Configure: better check for PCRE JIT.

On Mac OS X system toolchain by default prefers include files
from /usr/local/include, but libraries from /usr/lib.  This might result in
various problems, in particular the one outlined below.

If the PCRE library is installed into /usr/local/, this results in pcre.h
being used from /usr/local/include (with PCRE_CONFIG_JIT defined), but
libpcre from /usr/lib (as shipped with the OS, without pcre_free_study()
symbol).  As a result build fails as we use pcre_free_study() function
if we try to compile with PCRE JIT support.

Obvious workaround is to the root cause is to ask compiler to prefer
library from /usr/local/lib via ./configure --with-ld-opt="-L/usr/local/lib".
On the other hand, in any case it would be good to check if the function
we are going to use is available, hence the change.

See thread here for details:
http://mailman.nginx.org/pipermail/nginx-devel/2012-December/003074.html

Prodded by Piotr Sikora.
Limit rate: fixed integer overflow in limit calculation (ticket #256).

Patch by Alexey Antropov.
Proxy: better error message about unexpected data.

Requested by Igor Sysoev.
Fixed variable syntax checking in "set", "geo", "limit_conn_zone",
and "perl_set" directives.
Upstream: fixed SIGSEGV with the "if" directive.

Configuration like

    location / {
        set $true 1;

        if ($true) {
            proxy_pass http://backend;
        }

        if ($true) {
            # nothing
        }
    }

resulted in segmentation fault due to NULL pointer dereference as the
upstream configuration wasn't initialized in an implicit location created
by the last if(), but the r->content_handler was set due to first if().

Instead of committing a suicide by dereferencing a NULL pointer, return
500 (Internal Server Error) in such cases, i.e. if uscf is NULL.  Better
fix would be to avoid such cases by fixing the "if" directive handling,
but it's out of scope of this patch.

Prodded by Piotr Sikora.
Gzip: fixed zlib memLevel adjusting.

An incorrect memLevel (lower than 1) might be passed to deflateInit2() if the
"gzip_hash" directive is set to a value less than the value of "gzip_window"
directive. This resulted in "deflateInit2() failed: -2" alert and an empty
reply.
Fixed handling of ngx_write_fd() and ngx_read_fd() errors.

The ngx_write_fd() and ngx_read_fd() functions return -1 in case of error,
so the incorrect comparison with NGX_FILE_ERROR (which is 0 on windows
platforms) might result in inaccurate error message in the error log.

Also the ngx_errno global variable is being set only if the returned value
is -1.
Geo: improved ngx_http_geo_block() code readability.
Geo: fixed the "ranges" without ranges case.

The following configuration returned an empty value for $geo:

    geo $geo {
        ranges;
        default default;
    }
Simplified URL parsing code.

Except for the "listen" directive, "*" specified as a hostname is
no longer treated specially.
Fixed URL parsing code.

The URL parsing code is not expected to initialize port from default port
when in "no_resolve" mode.  This got broken in r4671 for the case of IPv6
literals.
Implemented IPv6 support for URLs specified using domain names.

This includes "debug_connection", upstreams, "proxy_pass", etc.
(ticket #92)

To preserve compatibility, "listen" specified with a domain name
selects the first IPv4 address, if available.  If not available,
the first IPv6 address will be used (ticket #186).
Added checks that disallow adding a variable with an empty name.
Added variable name syntax checks to "geo" and "map" directives.