Version bump.


git-svn-id: svn://svn.nginx.org/nginx/branches/stable-1.2@5150 73f98a42-aea0-e011-b76d-00259023448c
Merge of r5070: fixed false memset warning on Linux.

Fixed false memset warning on Linux with -O3 (ticket #275).

Prodded by John Leach.


git-svn-id: svn://svn.nginx.org/nginx/branches/stable-1.2@5151 73f98a42-aea0-e011-b76d-00259023448c
Merge of r5071: rebuild perl module on headers change.

Configure: rebuild perl module nginx.so if headers are changed.

Note: the "-p" argument of cp(1) dropped intentionally, to force nginx.so
rebuild.  It is considered too boring to properly list all dependencies
in Makefile.PL.


git-svn-id: svn://svn.nginx.org/nginx/branches/stable-1.2@5152 73f98a42-aea0-e011-b76d-00259023448c
Merge of r5078: removed zero termination of shm zone names.

It was added in r2717 and no longer needed since r2721,
where the termination was added to ngx_shm_alloc() and
ngx_init_zone_pool().  Since then it only corrupted error
messages about invalid zones.


git-svn-id: svn://svn.nginx.org/nginx/branches/stable-1.2@5153 73f98a42-aea0-e011-b76d-00259023448c
Merge of r5082: SSL: retry "sess_id" and "id" allocations.

SSL: retry "sess_id" and "id" allocations.

In case of fully populated SSL session cache with no memory left for
new allocations, ngx_ssl_new_session() will try to expire the oldest
non-expired session and retry, but only in case when slab allocation
fails for "cached_sess", not when slab allocation fails for either
"sess_id" or "id", which can happen for number of reasons and results
in new session not being cached.

Patch fixes this by adding retry logic to "sess_id" & "id" allocations.

Patch by Piotr Sikora.


git-svn-id: svn://svn.nginx.org/nginx/branches/stable-1.2@5154 73f98a42-aea0-e011-b76d-00259023448c
Merge of r5083: fixed potential segfault in keepalive handler.

Fixed potential segfault in ngx_http_keepalive_handler().

In case of error in the read event handling we close a connection
by calling ngx_http_close_connection(), that also destroys connection
pool. Thereafter, an attempt to free a buffer (added in r4892) that
was allocated from the pool could cause SIGSEGV and is meaningless
as well (the buffer already freed with the pool).


git-svn-id: svn://svn.nginx.org/nginx/branches/stable-1.2@5155 73f98a42-aea0-e011-b76d-00259023448c
Merge of r5098: mp4: fixed handling of too small mdat atoms.

Mp4: fixed handling of too small mdat atoms (ticket #266).

Patch by Gernot Vormayr (with minor changes).


git-svn-id: svn://svn.nginx.org/nginx/branches/stable-1.2@5156 73f98a42-aea0-e011-b76d-00259023448c
Merge of r5109, r5128: removed unused prototype and macro.

*) Removed unused prototype of ngx_http_find_server_conf().
   This function prototype and its implementation was added in r90,
   but the implementation was removed in r97.

*) Removed unused ngx_http_clear_variable() macro.


git-svn-id: svn://svn.nginx.org/nginx/branches/stable-1.2@5157 73f98a42-aea0-e011-b76d-00259023448c
Merge of r5113, r5114: upstream: resolve errors handling.

Upstream: call ngx_http_run_posted_requests() on resolve errors.

If proxy_pass to a host with dynamic resolution was used to handle
a subrequest, and host resolution failed, the main request wasn't run
till something else happened on the connection.  E.g. request to "/zzz"
with the following configuration hanged:

    addition_types *;
    resolver 8.8.8.8;

    location /test {
        set $ihost xxx;
        proxy_pass http://$ihost;
    }

    location /zzz {
        add_after_body /test;
        return 200 "test";
    }

Report and original version of the patch by Lanshun Zhou,
http://mailman.nginx.org/pipermail/nginx-devel/2013-March/003476.html.


git-svn-id: svn://svn.nginx.org/nginx/branches/stable-1.2@5158 73f98a42-aea0-e011-b76d-00259023448c
Merge of r5117, r5123: allocation errors handing during upgrade.

*) Core: guard against failed allocation during binary upgrade.
   Patch by Piotr Sikora.

*) Core: fixed resource leak if binary upgrade fails due to no memory.
   Found by Coverity (CID 992320).


git-svn-id: svn://svn.nginx.org/nginx/branches/stable-1.2@5159 73f98a42-aea0-e011-b76d-00259023448c
Merge of r5127: language in a comment.

Fixed language in a comment preceding ngx_http_index_handler().


git-svn-id: svn://svn.nginx.org/nginx/branches/stable-1.2@5160 73f98a42-aea0-e011-b76d-00259023448c
Merge of r5129: split clients configuration parsing.

Split clients: check length when parsing configuration.


git-svn-id: svn://svn.nginx.org/nginx/branches/stable-1.2@5161 73f98a42-aea0-e011-b76d-00259023448c
Merge of r5130, r5131, r5132: support for Mercurial repositories.

*) Misc: switch to single export operation in "zip" target.

   While exporting parts of the tree might be better in some cases, it
   is awfully slow overseas, and also requires unlocking ssh key multiple
   times.  Exporting the whole repo and removing directories not needed for
   zip is faster here.

   It is also a required step before we can switch to Mercurial.

*) Misc: removed unused "snapshot" target.

*) Misc: support for Mercurial repositories.


git-svn-id: svn://svn.nginx.org/nginx/branches/stable-1.2@5162 73f98a42-aea0-e011-b76d-00259023448c
Merge of r5133, r5134: peer.free() and peer.get() balance.

*) Upstream: only call peer.free() if peer.get() selected a peer.

*) Upstream: removed double-free workarounds in peer.free() methods.


git-svn-id: svn://svn.nginx.org/nginx/branches/stable-1.2@5163 73f98a42-aea0-e011-b76d-00259023448c
Merge of r5138: use of NGX_FILE_ERROR.

Use NGX_FILE_ERROR for handling file operations errors.

On Win32 platforms 0 is used to indicate errors in file operations, so
comparing against either -1 or NGX_OK is not portable.

This was not much of an issue in patched code, since only ngx_fd_info() test
is actually reachable on Win32 and in worst case it might result in bogus
error log entry.

Patch by Piotr Sikora.


git-svn-id: svn://svn.nginx.org/nginx/branches/stable-1.2@5164 73f98a42-aea0-e011-b76d-00259023448c