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