]> git.kaiwu.me - nginx.git/log
nginx.git
13 years agoRequest body: $content_length variable to honor real body size.
Maxim Dounin [Wed, 21 Nov 2012 01:05:08 +0000 (01:05 +0000)]
Request body: $content_length variable to honor real body size.

This allows to handle requests with chunked body by fastcgi and uwsgi
modules, and also simplifies handling of various request body modifications.

13 years agoRequest body: always use calculated size of a request body in proxy.
Maxim Dounin [Wed, 21 Nov 2012 01:03:48 +0000 (01:03 +0000)]
Request body: always use calculated size of a request body in proxy.

This allows to handle requests with chunked body, and also simplifies
handling of various request body modifications.

13 years agoRequest body: adjust b->pos when chunked parsing done.
Maxim Dounin [Wed, 21 Nov 2012 01:02:56 +0000 (01:02 +0000)]
Request body: adjust b->pos when chunked parsing done.

This is a nop for the current code, though will allow to correctly parse
pipelined requests.

13 years agoRequest body: chunked parsing moved to ngx_http_parse.c from proxy.
Maxim Dounin [Wed, 21 Nov 2012 00:59:16 +0000 (00:59 +0000)]
Request body: chunked parsing moved to ngx_http_parse.c from proxy.

No functional changes.

13 years agoRequest body: properly handle events while discarding body.
Maxim Dounin [Wed, 21 Nov 2012 00:57:56 +0000 (00:57 +0000)]
Request body: properly handle events while discarding body.

An attempt to call ngx_handle_read_event() before actually reading
data from a socket might result in read event being disabled, which is
wrong.  Catched by body.t test on Solaris.

13 years agoRequest body: fixed socket leak on errors.
Maxim Dounin [Wed, 21 Nov 2012 00:57:16 +0000 (00:57 +0000)]
Request body: fixed socket leak on errors.

The r->main->count reference counter was always incremented in
ngx_http_read_client_request_body(), while it is only needs to be
incremented on positive returns.

13 years agoRequest body: code duplication reduced, no functional changes.
Maxim Dounin [Wed, 21 Nov 2012 00:55:50 +0000 (00:55 +0000)]
Request body: code duplication reduced, no functional changes.

The r->request_body_in_file_only with empty body case is now handled in
ngx_http_write_request_body().

13 years agoRequest body: $request_body variable generalization.
Maxim Dounin [Wed, 21 Nov 2012 00:55:06 +0000 (00:55 +0000)]
Request body: $request_body variable generalization.

The $request_body variable was assuming there can't be more than two
buffers.  While this is currently true due to request body reading
implementation details, this is not a good thing to depend on and may
change in the future.

13 years agoRequest body: fixed "501 Not Implemented" error handling.
Maxim Dounin [Wed, 21 Nov 2012 00:54:01 +0000 (00:54 +0000)]
Request body: fixed "501 Not Implemented" error handling.

It is not about "Method" but a generic message, and is expected to be used
e.g. if specified Transfer-Encoding is not supported.  Fixed message to
match RFC 2616.

Additionally, disable keepalive on such errors as we won't be able to read
request body correctly if we don't understand Transfer-Encoding used.

13 years agoCore: added debug logging of writev() in ngx_write_chain_to_file().
Maxim Dounin [Wed, 21 Nov 2012 00:52:35 +0000 (00:52 +0000)]
Core: added debug logging of writev() in ngx_write_chain_to_file().

13 years agoDav: fixed segfault on PUT if body was already read (ticket #238).
Maxim Dounin [Wed, 21 Nov 2012 00:51:37 +0000 (00:51 +0000)]
Dav: fixed segfault on PUT if body was already read (ticket #238).

If request body reading happens with different options it's possible
that there will be no r->request_body->temp_file available (or even
no r->request_body available if body was discarded).  Return internal
server error in this case instead of committing suicide by dereferencing
a null pointer.

13 years agoFixed failure to start cache manager and cache loader processes
Igor Sysoev [Tue, 20 Nov 2012 13:37:55 +0000 (13:37 +0000)]
Fixed failure to start cache manager and cache loader processes
if there were more than 512 listening sockets in configuration.

13 years agoTrailing whitespace fix.
Maxim Dounin [Sat, 17 Nov 2012 00:36:44 +0000 (00:36 +0000)]
Trailing whitespace fix.

13 years agoUpstream: better detection of connect() failures with kqueue.
Maxim Dounin [Fri, 16 Nov 2012 18:29:19 +0000 (18:29 +0000)]
Upstream: better detection of connect() failures with kqueue.

Pending EOF might be reported on both read and write events, whichever
comes first, so check both of them.

Patch by Yichun Zhang (agentzh), slightly modified.

13 years agoUpstream: honor the "down" flag for a single server.
Ruslan Ermilov [Fri, 16 Nov 2012 12:18:05 +0000 (12:18 +0000)]
Upstream: honor the "down" flag for a single server.

If an upstream block was defined with the only server marked as
"down", e.g.

    upstream u {
        server 127.0.0.1:8080 down;
    }

an attempt was made to contact the server despite the "down" flag.
It is believed that immediate 502 response is better in such a
case, and it's also consistent with what is currently done in case
of multiple servers all marked as "down".

13 years agoVariables $request_time and $msec.
Ruslan Ermilov [Fri, 16 Nov 2012 09:37:14 +0000 (09:37 +0000)]
Variables $request_time and $msec.

Log module counterparts are preserved for efficiency.

13 years agoFixed setting of CPU affinity on respawn of dead worker processes.
Ruslan Ermilov [Fri, 16 Nov 2012 09:25:52 +0000 (09:25 +0000)]
Fixed setting of CPU affinity on respawn of dead worker processes.

Worker processes are now made aware of their sequential number needed
to select CPU affinity mask.  This replaces a workaround from r4865.

13 years agoVersion bump.
Ruslan Ermilov [Fri, 16 Nov 2012 07:49:41 +0000 (07:49 +0000)]
Version bump.

13 years agorelease-1.3.8 tag
Maxim Dounin [Tue, 30 Oct 2012 13:35:18 +0000 (13:35 +0000)]
release-1.3.8 tag

13 years agonginx-1.3.8-RELEASE release-1.3.8
Maxim Dounin [Tue, 30 Oct 2012 13:34:23 +0000 (13:34 +0000)]
nginx-1.3.8-RELEASE

13 years agoEvent pipe: fixed handling of buf_to_file data.
Maxim Dounin [Tue, 30 Oct 2012 11:14:24 +0000 (11:14 +0000)]
Event pipe: fixed handling of buf_to_file data.

Input filter might free a buffer if there is no data in it, and in case
of first buffer (used for cache header and request header, aka p->buf_to_file)
this resulted in cache corruption.  Buffer memory was reused to read upstream
response before headers were written to disk.

Fix is to avoid moving pointers in ngx_event_pipe_add_free_buf() to a buffer
start if we were asked to free a buffer used by p->buf_to_file.

This fixes occasional cache file corruption, usually resulted
in "cache file ... has md5 collision" alerts.

Reported by Anatoli Marinov.

13 years agoStyle, parentheses instead of braces in misc/GNUMakefile.
Maxim Dounin [Tue, 30 Oct 2012 11:09:38 +0000 (11:09 +0000)]
Style, parentheses instead of braces in misc/GNUMakefile.

13 years agoVariables $connection and $connection_requests.
Maxim Dounin [Mon, 29 Oct 2012 17:17:59 +0000 (17:17 +0000)]
Variables $connection and $connection_requests.

Log module counterparts are removed as they aren't used often and
there is no need to preserve them for efficiency.

13 years agoResolver: added missing memory allocation error handling.
Maxim Dounin [Wed, 24 Oct 2012 14:07:08 +0000 (14:07 +0000)]
Resolver: added missing memory allocation error handling.

13 years agongx_http_keepalive_handler() is now trying to not keep c->buffer's memory for
Valentin Bartenev [Tue, 23 Oct 2012 14:36:18 +0000 (14:36 +0000)]
ngx_http_keepalive_handler() is now trying to not keep c->buffer's memory for
idle connections.

This behaviour is consistent with the ngx_http_set_keepalive() function and it
should decrease memory usage in some cases (especially if epoll/rtsig is used).

13 years agoCore: the "auto" parameter of the "worker_processes" directive.
Andrey Belov [Tue, 23 Oct 2012 09:08:41 +0000 (09:08 +0000)]
Core: the "auto" parameter of the "worker_processes" directive.

The parameter will set the number of worker processes to the
autodetected number of available CPU cores.

13 years agoRemoved conditional compilation from waitpid() error test.
Maxim Dounin [Thu, 18 Oct 2012 14:48:33 +0000 (14:48 +0000)]
Removed conditional compilation from waitpid() error test.

There are reports that call to a signal handler for an exited process
despite waitpid() already called for the process may happen on Linux
as well.

13 years agoGunzip: fixed r->gzip_ok check.
Maxim Dounin [Thu, 18 Oct 2012 14:27:40 +0000 (14:27 +0000)]
Gunzip: fixed r->gzip_ok check.

13 years agoOCSP stapling: properly check if there is ssl.ctx.
Maxim Dounin [Fri, 5 Oct 2012 11:09:14 +0000 (11:09 +0000)]
OCSP stapling: properly check if there is ssl.ctx.

This fixes segfault if stapling was enabled in a server without a certificate
configured (and hence no ssl.ctx).

13 years agoVariable $bytes_sent.
Maxim Dounin [Wed, 3 Oct 2012 15:25:36 +0000 (15:25 +0000)]
Variable $bytes_sent.

It replicates variable $bytes_sent as previously available in log module
only.

Patch by Benjamin Grössing (with minor changes).

13 years agoLog: $apache_bytes_sent removed.
Maxim Dounin [Wed, 3 Oct 2012 15:25:06 +0000 (15:25 +0000)]
Log: $apache_bytes_sent removed.

It was renamed to $body_bytes_sent in nginx 0.3.10 and the old name is
deprecated since then.

13 years agoSSL: the "ssl_verify_client" directive parameter "optional_no_ca".
Maxim Dounin [Wed, 3 Oct 2012 15:24:08 +0000 (15:24 +0000)]
SSL: the "ssl_verify_client" directive parameter "optional_no_ca".

This parameter allows to don't require certificate to be signed by
a trusted CA, e.g. if CA certificate isn't known in advance, like in
WebID protocol.

Note that it doesn't add any security unless the certificate is actually
checked to be trusted by some external means (e.g. by a backend).

Patch by Mike Kazantsev, Eric O'Connor.

13 years agoVersion bump.
Maxim Dounin [Wed, 3 Oct 2012 15:22:18 +0000 (15:22 +0000)]
Version bump.

13 years agorelease-1.3.7 tag
Maxim Dounin [Tue, 2 Oct 2012 13:33:58 +0000 (13:33 +0000)]
release-1.3.7 tag

13 years agonginx-1.3.7-RELEASE release-1.3.7
Maxim Dounin [Tue, 2 Oct 2012 13:33:37 +0000 (13:33 +0000)]
nginx-1.3.7-RELEASE

13 years agoOCSP stapling: build fixes.
Maxim Dounin [Mon, 1 Oct 2012 13:54:13 +0000 (13:54 +0000)]
OCSP stapling: build fixes.

With the "ssl_stapling_verify" commit build with old OpenSSL libraries
was broken due to incorrect prototype of the ngx_ssl_stapling() function.
One incorrect use of ngx_log_debug() instead of ngx_log_debug2() slipped in
and broke win32 build.

13 years agoOCSP stapling: ssl_stapling_verify directive.
Maxim Dounin [Mon, 1 Oct 2012 12:53:11 +0000 (12:53 +0000)]
OCSP stapling: ssl_stapling_verify directive.

OCSP response verification is now switched off by default to simplify
configuration, and the ssl_stapling_verify allows to switch it on.

Note that for stapling OCSP response verification isn't something required
as it will be done by a client anyway.  But doing verification on a server
allows to mitigate some attack vectors, most notably stop an attacker from
presenting some specially crafted data to all site clients.

13 years agoOCSP stapling: OCSP_basic_verify() OCSP_TRUSTOTHER flag now used.
Maxim Dounin [Mon, 1 Oct 2012 12:51:27 +0000 (12:51 +0000)]
OCSP stapling: OCSP_basic_verify() OCSP_TRUSTOTHER flag now used.

This is expected to simplify configuration in a common case when OCSP
response is signed by a certificate already present in ssl_certificate
chain.  This case won't need any extra trusted certificates.

13 years agoOCSP stapling: log error data in ngx_ssl_error().
Maxim Dounin [Mon, 1 Oct 2012 12:50:36 +0000 (12:50 +0000)]
OCSP stapling: log error data in ngx_ssl_error().

It's hard to debug OCSP_basic_verify() failures without the actual error
string it records in the error data field.

13 years agoOCSP stapling: check Content-Type.
Maxim Dounin [Mon, 1 Oct 2012 12:48:54 +0000 (12:48 +0000)]
OCSP stapling: check Content-Type.

This will result in better error message in case of incorrect response
from OCSP responder:

... OCSP responder sent invalid "Content-Type" header: "text/plain"
    while requesting certificate status, responder: ...

vs.

... d2i_OCSP_RESPONSE() failed (SSL:
    error:0D07209B:asn1 encoding routines:ASN1_get_object:too long
    error:0D068066:asn1 encoding routines:ASN1_CHECK_TLEN:bad object header
    error:0D07803A:asn1 encoding routines:ASN1_ITEM_EX_D2I:nested asn1 error)
    while requesting certificate status, responder: ...

13 years agoOCSP stapling: loading OCSP responses.
Maxim Dounin [Mon, 1 Oct 2012 12:47:55 +0000 (12:47 +0000)]
OCSP stapling: loading OCSP responses.

This includes the ssl_stapling_responder directive (defaults to OCSP
responder set in certificate's AIA extension).

OCSP response for a given certificate is requested once we get at least
one connection with certificate_status extension in ClientHello, and
certificate status won't be sent in the connection in question.  This due
to limitations in the OpenSSL API (certificate status callback is blocking).

Note: SSL_CTX_use_certificate_chain_file() was reimplemented as it doesn't
allow to access the certificate loaded via SSL_CTX.

13 years agoOCSP stapling: the ngx_event_openssl_stapling.c file.
Maxim Dounin [Mon, 1 Oct 2012 12:42:43 +0000 (12:42 +0000)]
OCSP stapling: the ngx_event_openssl_stapling.c file.

Missed in previous commit.

13 years agoOCSP stapling: ssl_stapling_file support.
Maxim Dounin [Mon, 1 Oct 2012 12:41:08 +0000 (12:41 +0000)]
OCSP stapling: ssl_stapling_file support.

Very basic version without any OCSP responder query code, assuming valid
DER-encoded OCSP response is present in a ssl_stapling_file configured.

Such file might be produced with openssl like this:

openssl ocsp -issuer root.crt -cert domain.crt -respout domain.staple \
             -url http://ocsp.example.com

13 years agoOCSP stapling: ssl_trusted_certificate directive.
Maxim Dounin [Mon, 1 Oct 2012 12:39:36 +0000 (12:39 +0000)]
OCSP stapling: ssl_trusted_certificate directive.

The directive allows to specify additional trusted Certificate Authority
certificates to be used during certificate verification.  In contrast to
ssl_client_certificate DNs of these cerificates aren't sent to a client
during handshake.

Trusted certificates are loaded regardless of the fact whether client
certificates verification is enabled as the same certificates will be
used for OCSP stapling, during construction of an OCSP request and for
verification of an OCSP response.

The same applies to a CRL (which is now always loaded).

13 years agoResolver: cached addresses are returned with random rotation now.
Maxim Dounin [Fri, 28 Sep 2012 18:28:38 +0000 (18:28 +0000)]
Resolver: cached addresses are returned with random rotation now.

This ensures balancing when working with dynamically resolved upstream
servers with multiple addresses.

Based on patch by Anton Jouline.

13 years agoCorrect plural form for "path" in the whole source base.
Andrey Belov [Fri, 28 Sep 2012 13:49:26 +0000 (13:49 +0000)]
Correct plural form for "path" in the whole source base.

13 years agoMade sure to initialize the entire ngx_file_t structure.
Andrey Belov [Fri, 28 Sep 2012 13:15:11 +0000 (13:15 +0000)]
Made sure to initialize the entire ngx_file_t structure.

Found by Coverity.

13 years agoSSL: added version checks for ssl compression workaround.
Maxim Dounin [Thu, 27 Sep 2012 18:01:06 +0000 (18:01 +0000)]
SSL: added version checks for ssl compression workaround.

The SSL_COMP_get_compression_methods() is only available as an API
function in OpenSSL 0.9.8+, require it explicitly to unbreak build
with OpenSSL 0.9.7.

13 years agoSSL: fixed compression workaround to remove all methods.
Maxim Dounin [Thu, 27 Sep 2012 17:59:59 +0000 (17:59 +0000)]
SSL: fixed compression workaround to remove all methods.

Previous code used sk_SSL_COMP_delete(ssl_comp_methods, i) while iterating
stack from 0 to n, resulting in removal of only even compression methods.

In real life this change is a nop, as there is only one compression method
which is enabled by default in OpenSSL.

13 years agoConfigure: additional test for ExtUtils::Embed perl module presence.
Andrey Belov [Thu, 27 Sep 2012 15:01:57 +0000 (15:01 +0000)]
Configure: additional test for ExtUtils::Embed perl module presence.

Now perl configure will correctly fail if ExtUtils::Embed perl module
is not present in the system (found on Amazon Linux AMI, as of
release 2012.03).

13 years agoConfigure: help updated to list upstream keepalive and least_conn.
Maxim Dounin [Wed, 26 Sep 2012 16:39:38 +0000 (16:39 +0000)]
Configure: help updated to list upstream keepalive and least_conn.

Patch by Joshua Zhu.

13 years agoAdded clearing of cpu_affinity after process spawn.
Maxim Dounin [Wed, 26 Sep 2012 16:25:12 +0000 (16:25 +0000)]
Added clearing of cpu_affinity after process spawn.

This fixes unwanted/incorrect cpu_affinity use on dead worker processes
respawn.  While this is not ideal, it's expected to be better when previous
situation where multiple processes were spawn with identical CPU affinity
set.

Reported by Charles Chen.

13 years agoVersion bump.
Maxim Dounin [Wed, 26 Sep 2012 15:52:06 +0000 (15:52 +0000)]
Version bump.

13 years agorelease-1.3.6 tag
Maxim Dounin [Wed, 12 Sep 2012 10:41:56 +0000 (10:41 +0000)]
release-1.3.6 tag

13 years agonginx-1.3.6-RELEASE release-1.3.6
Maxim Dounin [Wed, 12 Sep 2012 10:41:36 +0000 (10:41 +0000)]
nginx-1.3.6-RELEASE

13 years agoUpdated zlib used for win32 builds.
Maxim Dounin [Tue, 11 Sep 2012 13:36:34 +0000 (13:36 +0000)]
Updated zlib used for win32 builds.

13 years agoHelper target "win32" to run configure for win32 builds.
Maxim Dounin [Tue, 11 Sep 2012 13:17:31 +0000 (13:17 +0000)]
Helper target "win32" to run configure for win32 builds.

13 years agoConfigure: fixed make macros to use parentheses instead of braces.
Maxim Dounin [Tue, 11 Sep 2012 12:43:59 +0000 (12:43 +0000)]
Configure: fixed make macros to use parentheses instead of braces.

Parentheses are more portable, in particular they are understood by nmake
while braces aren't.

13 years agoImproved 50x error page.
Valentin Bartenev [Tue, 11 Sep 2012 12:37:04 +0000 (12:37 +0000)]
Improved 50x error page.

The feature set of the new page:

 - HTML5 compliant;
 - Looks similar to the new "Welcome page" (r4835);
 - Sysadmin hint with a link to the documentation of the "error_log" directive.

13 years agoConfigure: provide inflate() when building zlib on win32.
Maxim Dounin [Tue, 11 Sep 2012 12:35:30 +0000 (12:35 +0000)]
Configure: provide inflate() when building zlib on win32.

It is now needed for gunzip filter.

13 years agoGunzip: removed nginx.h leftover include.
Maxim Dounin [Tue, 11 Sep 2012 01:13:23 +0000 (01:13 +0000)]
Gunzip: removed nginx.h leftover include.

13 years agoGunzip filter import.
Maxim Dounin [Mon, 10 Sep 2012 16:52:47 +0000 (16:52 +0000)]
Gunzip filter import.

13 years agoGzip static: "always" parameter in "gzip_static" directive.
Maxim Dounin [Mon, 10 Sep 2012 16:48:25 +0000 (16:48 +0000)]
Gzip static: "always" parameter in "gzip_static" directive.

With "always" gzip static returns gzipped content in all cases, without
checking if client supports it.  It is useful if there are no uncompressed
files on disk anyway.

13 years agoMemcached: memcached_gzip_flag directive.
Maxim Dounin [Mon, 10 Sep 2012 16:43:49 +0000 (16:43 +0000)]
Memcached: memcached_gzip_flag directive.

This directive allows to test desired flag as returned by memcached and
sets Content-Encoding to gzip if one found.

This is reimplementation of patch by Tomash Brechko as available on
http://openhack.ru/.  It should be a bit more correct though (at least
I think so).  In particular, it doesn't try to detect if we are able to
gunzip data, but instead just sets correct Content-Encoding.

13 years agoImproved welcome page.
Valentin Bartenev [Fri, 7 Sep 2012 13:24:46 +0000 (13:24 +0000)]
Improved welcome page.

The feature set of the new page:

 - HTML5 compliant;
 - Description of why the user is seeing the page and what his next
   step should be;
 - Links to official community and commercial support websites.

13 years agoWrite filter: replaced unneeded loop with one to free chains.
Maxim Dounin [Wed, 5 Sep 2012 15:06:47 +0000 (15:06 +0000)]
Write filter: replaced unneeded loop with one to free chains.

Noted by Gabor Lekeny.

13 years agoLimit req: fix of rbtree node insertion on hash collisions.
Valentin Bartenev [Mon, 3 Sep 2012 12:55:50 +0000 (12:55 +0000)]
Limit req: fix of rbtree node insertion on hash collisions.

The rbtree used in ngx_http_limit_req_module has two level of keys, the top is
hash, and the next is the value string itself. However, when inserting a new
node, only hash has been set, while the value string has been left empty.

The bug was introduced in r4419 (1.1.14).

Found by Charles Chen.

13 years agoPass changes.xml thru xmllint when generating CHANGES and CHANGES.ru.
Ruslan Ermilov [Thu, 30 Aug 2012 16:08:13 +0000 (16:08 +0000)]
Pass changes.xml thru xmllint when generating CHANGES and CHANGES.ru.

13 years agoConverted DOS-style newlines.
Ruslan Ermilov [Thu, 30 Aug 2012 16:05:43 +0000 (16:05 +0000)]
Converted DOS-style newlines.

13 years agoFixed overflow if ngx_slab_alloc() is called with very big "size" argument.
Ruslan Ermilov [Thu, 30 Aug 2012 15:09:21 +0000 (15:09 +0000)]
Fixed overflow if ngx_slab_alloc() is called with very big "size" argument.

13 years agoFixed strict aliasing bugs when dealing with IPv4-mapped IPv6 addresses
Ruslan Ermilov [Thu, 30 Aug 2012 14:58:11 +0000 (14:58 +0000)]
Fixed strict aliasing bugs when dealing with IPv4-mapped IPv6 addresses
(closes #201).

13 years agoFixed the "include" directive.
Ruslan Ermilov [Tue, 28 Aug 2012 13:31:01 +0000 (13:31 +0000)]
Fixed the "include" directive.

The "include" directive should be able to include multiple files if
given a filename mask.  Fixed this to work for "include" directives
inside the "map" or "types" blocks.  The "include" directive inside
the "geo" block is still not fixed.

13 years agoVersion bump.
Ruslan Ermilov [Mon, 27 Aug 2012 14:21:41 +0000 (14:21 +0000)]
Version bump.

13 years agorelease-1.3.5 tag
Maxim Dounin [Tue, 21 Aug 2012 13:05:26 +0000 (13:05 +0000)]
release-1.3.5 tag

13 years agonginx-1.3.5-RELEASE release-1.3.5
Maxim Dounin [Tue, 21 Aug 2012 13:05:02 +0000 (13:05 +0000)]
nginx-1.3.5-RELEASE

13 years agoRadix tree preallocation fix.
Maxim Dounin [Sat, 18 Aug 2012 23:17:58 +0000 (23:17 +0000)]
Radix tree preallocation fix.

The preallocation size was calculated incorrectly and was always 8 due to
sizeof(ngx_radix_tree_t) accidentally used instead of sizeof(ngx_radix_node_t).

13 years agoWhitespace fix.
Maxim Dounin [Sat, 18 Aug 2012 23:04:39 +0000 (23:04 +0000)]
Whitespace fix.

13 years agoMark logically dead code with corresponding comment.
Andrey Belov [Fri, 17 Aug 2012 15:35:50 +0000 (15:35 +0000)]
Mark logically dead code with corresponding comment.

Found by Coverity.

13 years agoMp4: removed restriction to avc1/mp4a formats (ticket #194).
Maxim Dounin [Fri, 17 Aug 2012 11:02:35 +0000 (11:02 +0000)]
Mp4: removed restriction to avc1/mp4a formats (ticket #194).

13 years agoMail: fixed handling of AF_UNIX addresses in "listen".
Ruslan Ermilov [Fri, 17 Aug 2012 05:21:28 +0000 (05:21 +0000)]
Mail: fixed handling of AF_UNIX addresses in "listen".

This makes AF_UNIX addresses in mail officially supported.

13 years agoRemoved a stale "AF_INET only" comment.
Ruslan Ermilov [Fri, 17 Aug 2012 05:14:19 +0000 (05:14 +0000)]
Removed a stale "AF_INET only" comment.

IPv6 client connections in mail modules have been supported since r2856.

13 years agoMail: fixed sorting of listen addresses (ticket #187).
Ruslan Ermilov [Fri, 17 Aug 2012 05:08:42 +0000 (05:08 +0000)]
Mail: fixed sorting of listen addresses (ticket #187).

For http module this problem was already fixed in r4756.

13 years agoGeo: fixed handling of ranges without default set.
Maxim Dounin [Thu, 16 Aug 2012 13:01:41 +0000 (13:01 +0000)]
Geo: fixed handling of ranges without default set.

The bug had appeared in 0.8.43 (r3653).  Patch by Weibin Yao.

13 years agoCrypt: fixed handling of corrupted SSHA entries in password file.
Maxim Dounin [Thu, 16 Aug 2012 12:05:58 +0000 (12:05 +0000)]
Crypt: fixed handling of corrupted SSHA entries in password file.

Found by Coverity.

13 years agoMap: fixed optimization of variables as values.
Maxim Dounin [Thu, 16 Aug 2012 10:58:18 +0000 (10:58 +0000)]
Map: fixed optimization of variables as values.

Previous code incorrectly used ctx->var_values as an array of pointers to
ngx_http_variable_value_t, but the array contains structures, not pointers.
Additionally, ctx->var_values inspection failed to properly set var on
match.

13 years agomail_core: don't let the well-known port in the "listen" directive to
Ruslan Ermilov [Wed, 15 Aug 2012 11:30:24 +0000 (11:30 +0000)]
mail_core: don't let the well-known port in the "listen" directive to
override the already set "protocol".

13 years agoCorrected the directive name in the ngx_mail_auth_http_module error message.
Ruslan Ermilov [Wed, 15 Aug 2012 11:17:55 +0000 (11:17 +0000)]
Corrected the directive name in the ngx_mail_auth_http_module error message.

13 years agoAdded three missing checks for NULL after ngx_array_push() calls.
Valentin Bartenev [Wed, 8 Aug 2012 12:03:46 +0000 (12:03 +0000)]
Added three missing checks for NULL after ngx_array_push() calls.

Found by Coverity.

13 years agoExplicitly ignore returned value from close() in ngx_event_core_init_conf().
Andrey Belov [Tue, 7 Aug 2012 13:57:04 +0000 (13:57 +0000)]
Explicitly ignore returned value from close() in ngx_event_core_init_conf().

We don't have strong reason to inform about any errors
reported by close() call here, and there are no other things
to do with its return value.

Prodded by Coverity.

13 years agoExplicitly ignore returned value from unlink() in ngx_open_tempfile().
Andrey Belov [Mon, 6 Aug 2012 16:06:59 +0000 (16:06 +0000)]
Explicitly ignore returned value from unlink() in ngx_open_tempfile().

The only thing we could potentially do here in case of error
returned is to complain to error log, but we don't have log
structure available here due to interface limitations.

Prodded by Coverity.

13 years agoResolver: fixed possible memory leak in ngx_resolver_create().
Maxim Dounin [Mon, 6 Aug 2012 10:48:09 +0000 (10:48 +0000)]
Resolver: fixed possible memory leak in ngx_resolver_create().

Found by Coverity.

13 years agoFixed the -p parameter handling.
Ruslan Ermilov [Fri, 3 Aug 2012 12:52:32 +0000 (12:52 +0000)]
Fixed the -p parameter handling.

Ensure that the path supplied always ends with a `/' except when empty.
An empty value now corresponds to the current directory instead of `/'.

13 years agoFixed possible use of old cached times if runtime went backwards.
Maxim Dounin [Fri, 3 Aug 2012 09:10:39 +0000 (09:10 +0000)]
Fixed possible use of old cached times if runtime went backwards.

If ngx_time_sigsafe_update() updated only ngx_cached_err_log_time, and
then clock was adjusted backwards, the cached_time[slot].sec might
accidentally match current seconds on next ngx_time_update() call,
resulting in various cached times not being updated.

Fix is to clear the cached_time[slot].sec to explicitly mark cached times
are stale and need updating.

13 years agoAdded "const" to ngx_memcpy() with NGX_MEMCPY_LIMIT defined.
Maxim Dounin [Fri, 3 Aug 2012 09:07:30 +0000 (09:07 +0000)]
Added "const" to ngx_memcpy() with NGX_MEMCPY_LIMIT defined.

This fixes warning produced during compilation of the ngx_http_geoip_module
due to const qualifier being discarded.

13 years agoWhitespace fix.
Maxim Dounin [Fri, 3 Aug 2012 09:00:25 +0000 (09:00 +0000)]
Whitespace fix.

13 years agoRemoved the need in Perl to generate ZIP archive of nginx/Windows.
Ruslan Ermilov [Thu, 2 Aug 2012 14:58:36 +0000 (14:58 +0000)]
Removed the need in Perl to generate ZIP archive of nginx/Windows.

13 years agoWin32: fixed build with Visual Studio 2005 Express.
Maxim Dounin [Thu, 2 Aug 2012 12:53:07 +0000 (12:53 +0000)]
Win32: fixed build with Visual Studio 2005 Express.

It is available via winetricks which makes it still usable, and has
an old crtdefs.h which uses _CRT_SECURE_NO_DEPRECATE instead of
_CRT_SECURE_NO_WARNINGS to suppress warnings.

Reported by HAYASHI Kentaro,
http://mailman.nginx.org/pipermail/nginx-devel/2012-August/002542.html

13 years agoReorder checks in ngx_shared_memory_add() for more consistent error messages.
Andrey Belov [Wed, 1 Aug 2012 14:37:08 +0000 (14:37 +0000)]
Reorder checks in ngx_shared_memory_add() for more consistent error messages.

13 years agoSimplified makefile that builds CHANGES.
Ruslan Ermilov [Tue, 31 Jul 2012 21:49:23 +0000 (21:49 +0000)]
Simplified makefile that builds CHANGES.

13 years agoVersion bump.
Ruslan Ermilov [Tue, 31 Jul 2012 21:47:56 +0000 (21:47 +0000)]
Version bump.