Fixed memory leak if $geoip_org variable was used.

Patch by Denis F. Latypoff (slightly modified).


git-svn-id: svn://svn.nginx.org/nginx/trunk@4648 73f98a42-aea0-e011-b76d-00259023448c
Fixed broken build.


git-svn-id: svn://svn.nginx.org/nginx/trunk@4649 73f98a42-aea0-e011-b76d-00259023448c
geoip: got rid of ugly casts when calling ngx_free().

This is done by removing the "const" qualifier from the common return
type of handler functions returning either "const char *" or "char *".


git-svn-id: svn://svn.nginx.org/nginx/trunk@4650 73f98a42-aea0-e011-b76d-00259023448c
Fixed returned value handling from the cookie rewrite handler.

If the "proxy_cookie_domain" or "proxy_cookie_path" directive is used and there
are no matches in Set-Cookie header then ngx_http_proxy_rewrite_cookie() returns
NGX_DECLINED to indicate that the header was not rewritten. Returning this value
further from the upstream headers copy handler resulted in 500 error response.

See here for report:
http://mailman.nginx.org/pipermail/nginx/2012-May/033858.html


git-svn-id: svn://svn.nginx.org/nginx/trunk@4651 73f98a42-aea0-e011-b76d-00259023448c
Removed mistaken setting of NGX_SSL_BUFFERED flag in ngx_ssl_send_chain()
if SSL buffer is not used.


git-svn-id: svn://svn.nginx.org/nginx/trunk@4652 73f98a42-aea0-e011-b76d-00259023448c
Code reduction (no functional changes).


git-svn-id: svn://svn.nginx.org/nginx/trunk@4653 73f98a42-aea0-e011-b76d-00259023448c
Resolver: fixed format specification.

Patch by Yichun Zhang (agentzh).


git-svn-id: svn://svn.nginx.org/nginx/trunk@4654 73f98a42-aea0-e011-b76d-00259023448c
Upstream: least_conn balancer module.


git-svn-id: svn://svn.nginx.org/nginx/trunk@4655 73f98a42-aea0-e011-b76d-00259023448c
Upstream: weights support in ip_hash balancer.


git-svn-id: svn://svn.nginx.org/nginx/trunk@4656 73f98a42-aea0-e011-b76d-00259023448c
Upstream: least_conn compilation fixes.

Removed duplicate call of ngx_http_upstream_init_round_robin_peer()
overlooked during code changes.  Rewritten "return lcp->free_rr_peer(...)"
as MSVC doesn't like it.


git-svn-id: svn://svn.nginx.org/nginx/trunk@4657 73f98a42-aea0-e011-b76d-00259023448c
Support for IPv6 literals in proxy_pass and so on.


git-svn-id: svn://svn.nginx.org/nginx/trunk@4671 73f98a42-aea0-e011-b76d-00259023448c
Support for IPv6 literals and an optional port in resolver.


git-svn-id: svn://svn.nginx.org/nginx/trunk@4672 73f98a42-aea0-e011-b76d-00259023448c
Win32: disallowed access to various non-canonical name variants.

This includes trailings dots and spaces, NTFS streams (and short names, as
previously checked).  The checks are now also done in ngx_file_info(), thus
allowing to use the "try_files" directive to protect external scripts.


git-svn-id: svn://svn.nginx.org/nginx/trunk@4674 73f98a42-aea0-e011-b76d-00259023448c
Win32: normalization of trailing dot inside uri.

Windows treats "/directory./" identical to "/directory/".  Do the same
when working on Windows.  Note that the behaviour is different from one
with last path component (where multiple spaces and dots are ignored by
Windows).


git-svn-id: svn://svn.nginx.org/nginx/trunk@4675 73f98a42-aea0-e011-b76d-00259023448c
Win32: uris with ":$" are now rejected.

There are too many problems with special NTFS streams, notably "::$data",
"::$index_allocation" and ":$i30:$index_allocation".

For now we don't reject all URIs with ":" like Apache does as there are no
good reasons seen yet, and there are multiple programs using it in URLs
(e.g. MediaWiki).


git-svn-id: svn://svn.nginx.org/nginx/trunk@4676 73f98a42-aea0-e011-b76d-00259023448c
nginx-1.3.1-RELEASE


git-svn-id: svn://svn.nginx.org/nginx/trunk@4677 73f98a42-aea0-e011-b76d-00259023448c