]> git.kaiwu.me - nginx.git/log
nginx.git
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.

13 years agoUpdated PCRE used for win32 builds.
Ruslan Ermilov [Tue, 31 Jul 2012 13:13:52 +0000 (13:13 +0000)]
Updated PCRE used for win32 builds.

13 years agorelease-1.3.4 tag
Ruslan Ermilov [Tue, 31 Jul 2012 12:38:57 +0000 (12:38 +0000)]
release-1.3.4 tag

13 years agonginx-1.3.4-RELEASE release-1.3.4
Ruslan Ermilov [Tue, 31 Jul 2012 12:38:37 +0000 (12:38 +0000)]
nginx-1.3.4-RELEASE

13 years agoCore: ipv6only is now on by default.
Ruslan Ermilov [Mon, 30 Jul 2012 12:27:06 +0000 (12:27 +0000)]
Core: ipv6only is now on by default.

There is a general consensus that this change results in better
consistency between different operating systems and differently
tuned operating systems.

Note: this changes the width and meaning of the ipv6only field
of the ngx_listening_t structure.  3rd party modules that create
their own listening sockets might need fixing.

13 years agongx_http_find_virtual_server() should return NGX_DECLINED if virtual server not
Valentin Bartenev [Mon, 30 Jul 2012 11:42:03 +0000 (11:42 +0000)]
ngx_http_find_virtual_server() should return NGX_DECLINED if virtual server not
found.

13 years agoUpstream: hide_headers/pass_headers inheritance fix.
Maxim Dounin [Mon, 30 Jul 2012 10:35:26 +0000 (10:35 +0000)]
Upstream: 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

13 years agoImproved diagnostics when a directive is specified in the wrong context.
Ruslan Ermilov [Sun, 29 Jul 2012 19:59:06 +0000 (19:59 +0000)]
Improved diagnostics when a directive is specified in the wrong context.

13 years agoRemoved extraneous GCC warning flags.
Ruslan Ermilov [Sun, 29 Jul 2012 19:45:30 +0000 (19:45 +0000)]
Removed extraneous GCC warning flags.

13 years agoSlight optimization in ngx_http_upstream_add(): replaced an expression
Ruslan Ermilov [Sun, 29 Jul 2012 19:44:09 +0000 (19:44 +0000)]
Slight optimization in ngx_http_upstream_add(): replaced an expression
known to be constant with the constant value.

13 years agongx_http_upstream_add() should return NULL if an error occurs.
Ruslan Ermilov [Sun, 29 Jul 2012 19:38:25 +0000 (19:38 +0000)]
ngx_http_upstream_add() should return NULL if an error occurs.

13 years agoReduced the number of preprocessor directives.
Ruslan Ermilov [Thu, 26 Jul 2012 14:47:42 +0000 (14:47 +0000)]
Reduced the number of preprocessor directives.

13 years agoWhen "debug_connection" is configured with a domain name, only the first
Ruslan Ermilov [Tue, 24 Jul 2012 17:40:06 +0000 (17:40 +0000)]
When "debug_connection" is configured with a domain name, only the first
resolved address was used.  Now all addresses will be used.

13 years agoAdded the Clang compiler support.
Ruslan Ermilov [Tue, 24 Jul 2012 15:17:03 +0000 (15:17 +0000)]
Added the Clang compiler support.

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

13 years agoMade sure to run configure in a "C" locale.
Ruslan Ermilov [Tue, 24 Jul 2012 15:16:09 +0000 (15:16 +0000)]
Made sure to run configure in a "C" locale.

Otherwise, we may fail to properly detect a version of compiler.

13 years agoAdded a commented out -Wmissing-prototypes to CFLAGS.
Ruslan Ermilov [Tue, 24 Jul 2012 15:13:34 +0000 (15:13 +0000)]
Added a commented out -Wmissing-prototypes to CFLAGS.

It is commented out to not break builds with 3rd party modules.

13 years agoFixed compilation with -Wmissing-prototypes.
Ruslan Ermilov [Tue, 24 Jul 2012 15:09:54 +0000 (15:09 +0000)]
Fixed compilation with -Wmissing-prototypes.

13 years agoReplaced a number of "else if" with "elif".
Ruslan Ermilov [Tue, 24 Jul 2012 15:00:42 +0000 (15:00 +0000)]
Replaced a number of "else if" with "elif".

13 years agoWin32: fixed cpu hog after process startup failure.
Maxim Dounin [Mon, 23 Jul 2012 16:37:24 +0000 (16:37 +0000)]
Win32: fixed cpu hog after process startup failure.

If ngx_spawn_process() failed while starting a process, the process
handle 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 V G:
http://mailman.nginx.org/pipermail/nginx-devel/2012-July/002494.html

13 years agoFixed debugging messages to account that limit_zone was renamed to limit_conn.
Ruslan Ermilov [Fri, 20 Jul 2012 08:21:59 +0000 (08:21 +0000)]
Fixed debugging messages to account that limit_zone was renamed to limit_conn.

13 years agoFixed sorting of listen addresses so that wildcard address is always at
Ruslan Ermilov [Tue, 17 Jul 2012 04:47:34 +0000 (04:47 +0000)]
Fixed sorting of listen addresses so that wildcard address is always at
the end (closes #187).  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.

13 years agoVersion bump.
Ruslan Ermilov [Tue, 17 Jul 2012 04:42:38 +0000 (04:42 +0000)]
Version bump.

13 years agoSynchronized the license text with the FreeBSD's bsd-style-copyright.
Ruslan Ermilov [Tue, 10 Jul 2012 12:40:35 +0000 (12:40 +0000)]
Synchronized the license text with the FreeBSD's bsd-style-copyright.

13 years agorelease-1.3.3 tag
Maxim Dounin [Tue, 10 Jul 2012 12:20:30 +0000 (12:20 +0000)]
release-1.3.3 tag

13 years agonginx-1.3.3-RELEASE release-1.3.3
Maxim Dounin [Tue, 10 Jul 2012 12:20:10 +0000 (12:20 +0000)]
nginx-1.3.3-RELEASE

13 years agoEntity tags: empty etags handling in If-Range.
Maxim Dounin [Mon, 9 Jul 2012 17:04:37 +0000 (17:04 +0000)]
Entity tags: empty etags handling in If-Range.

Entity tag may be of length 2 as per RFC 2616, i.e. double quotes only.
Pointed out by Ruslan Ermilov.

13 years agoEntity tags: the "etag" directive.
Maxim Dounin [Mon, 9 Jul 2012 14:53:42 +0000 (14:53 +0000)]
Entity tags: the "etag" directive.

It allows to disable generation of nginx's own entity tags, while
still handling ETags in cache properly.  This may be useful e.g.
if one want to serve static files from servers with different ETag
generation algorithms.

13 years agoEntity tags: set for static respones.
Maxim Dounin [Mon, 9 Jul 2012 00:13:06 +0000 (00:13 +0000)]
Entity tags: set for static respones.

13 years agoEntity tags: handling in add_header.
Maxim Dounin [Sat, 7 Jul 2012 21:24:01 +0000 (21:24 +0000)]
Entity tags: handling in add_header.

Notably this allows to clear ETag if one want to for some reason.