Merge of r4737: r->uri_changed in a named location fix.

Reset r->uri_changed in a named location (ticket #184).


git-svn-id: svn://svn.nginx.org/nginx/branches/stable-1.2@4788 73f98a42-aea0-e011-b76d-00259023448c
Merge of r4738: struct flock initialization.

Made sure to initialize the entire "struct flock" allocated on stack.


git-svn-id: svn://svn.nginx.org/nginx/branches/stable-1.2@4789 73f98a42-aea0-e011-b76d-00259023448c
Merge of r4740: fixed $request_length for pipelined requests.


git-svn-id: svn://svn.nginx.org/nginx/branches/stable-1.2@4790 73f98a42-aea0-e011-b76d-00259023448c
Merge of r4741: fixed "make" used instead of "${MAKE}".


git-svn-id: svn://svn.nginx.org/nginx/branches/stable-1.2@4791 73f98a42-aea0-e011-b76d-00259023448c
Merge of r4754: synchronized the license text.

Synchronized the license text with the FreeBSD's bsd-style-copyright.


git-svn-id: svn://svn.nginx.org/nginx/branches/stable-1.2@4792 73f98a42-aea0-e011-b76d-00259023448c
Merge of r4756: fixed listen addresses sorting (ticket #187) 

Fixed sorting of listen addresses so that wildcard address is always at
the end.  Failure to do so could result in several listen sockets to be
created instead of only one listening on wildcard address.

Reported by Roman Odaisky.


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


git-svn-id: svn://svn.nginx.org/nginx/branches/stable-1.2@4794 73f98a42-aea0-e011-b76d-00259023448c
Merge of r4757: debugging messages in limit_conn.

Fixed debugging messages to account that limit_zone was renamed to limit_conn.


git-svn-id: svn://svn.nginx.org/nginx/branches/stable-1.2@4796 73f98a42-aea0-e011-b76d-00259023448c
Merge of r4758: win32: fixed cpu hog after process startup failure.

If ngx_spawn_process() failed while starting a process, the handle of a
handle of a processes was closed but left non-NULL in the ngx_processes[]
array.  The handle later was used in WaitForMultipleObjects() (if there
were multiple worker processes configured and at least one worker process
was started successfully), resulting in infinite loop.

Reported by Ricardo Villalobos Guevara:
http://mailman.nginx.org/pipermail/nginx-devel/2012-July/002494.html


git-svn-id: svn://svn.nginx.org/nginx/branches/stable-1.2@4797 73f98a42-aea0-e011-b76d-00259023448c
Merge of r4759, r4762, r4768: configure minor fixes.

*) Replaced a number of "else if" with "elif".

*) Made sure to run configure in a "C" locale.  Otherwise, we may fail
   to properly detect a version of compiler.

*) Removed extraneous GCC warning flags.


git-svn-id: svn://svn.nginx.org/nginx/branches/stable-1.2@4798 73f98a42-aea0-e011-b76d-00259023448c
Merge of r4760, r4761: -Wmissing-prototypes.

Fixed compilation with -Wmissing-prototypes.  Added a commented
out -Wmissing-prototypes to CFLAGS.  It is commented out to not break
builds with 3rd party modules.


git-svn-id: svn://svn.nginx.org/nginx/branches/stable-1.2@4799 73f98a42-aea0-e011-b76d-00259023448c
Merge of r4763: added the Clang compiler support.

The -Werror is commented out to not break builds on Linux.


git-svn-id: svn://svn.nginx.org/nginx/branches/stable-1.2@4800 73f98a42-aea0-e011-b76d-00259023448c
Merge of r4764: debug_connection with a domain name change.

When "debug_connection" is configured with a domain name, only the first
resolved address was used.  Now all addresses will be used.


git-svn-id: svn://svn.nginx.org/nginx/branches/stable-1.2@4801 73f98a42-aea0-e011-b76d-00259023448c
Merge of r4765: reduced the number of preprocessor directives.


git-svn-id: svn://svn.nginx.org/nginx/branches/stable-1.2@4802 73f98a42-aea0-e011-b76d-00259023448c
Merge of r4766, r4767: ngx_http_upstream_add() changes.

*) Fixed to return NULL if an error occurs.

*) Microoptimization: replaced an expression known to be constant with
   the constant value.


git-svn-id: svn://svn.nginx.org/nginx/branches/stable-1.2@4803 73f98a42-aea0-e011-b76d-00259023448c
Merge of r4769: better diagnostics for directives in wrong context.


git-svn-id: svn://svn.nginx.org/nginx/branches/stable-1.2@4804 73f98a42-aea0-e011-b76d-00259023448c
Merge of r4770: hide_headers/pass_headers inheritance fix.

Hide headers and pass headers arrays might not be inherited correctly
into a nested location, e.g. in configuration like

    server {
        proxy_hide_header X-Foo;
        location / {
            location /nested/ {
                proxy_pass_header X-Pad;
            }
        }
    }

the X-Foo header wasn't hidden in the location /nested/.

Reported by Konstantin Svist,
http://mailman.nginx.org/pipermail/nginx-ru/2012-July/047555.html


git-svn-id: svn://svn.nginx.org/nginx/branches/stable-1.2@4805 73f98a42-aea0-e011-b76d-00259023448c
Merge of r4771: ngx_http_find_virtual_server() fix.

The ngx_http_find_virtual_server() function should return NGX_DECLINED
if virtual server not found.


git-svn-id: svn://svn.nginx.org/nginx/branches/stable-1.2@4806 73f98a42-aea0-e011-b76d-00259023448c
Merge of r4775: updated PCRE used for win32 builds.


git-svn-id: svn://svn.nginx.org/nginx/branches/stable-1.2@4807 73f98a42-aea0-e011-b76d-00259023448c
Merge of r4739: s/ngx_shmtx_destory/ngx_shmtx_destroy/.


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