]> git.kaiwu.me - nginx.git/log
nginx.git
10 years agoHTTP/2: fixed header block parsing with CONTINUATION frames (#792).
Valentin Bartenev [Mon, 21 Sep 2015 22:40:04 +0000 (01:40 +0300)]
HTTP/2: fixed header block parsing with CONTINUATION frames (#792).

It appears that the CONTINUATION frames don't need to be aligned to bounds of
individual headers.

10 years agoHTTP/2: fixed HPACK header field parsing.
Valentin Bartenev [Mon, 21 Sep 2015 22:40:04 +0000 (01:40 +0300)]
HTTP/2: fixed HPACK header field parsing.

10 years agoSub filter: fixed initialization in http{} level (ticket #791).
Roman Arutyunyan [Mon, 21 Sep 2015 20:08:34 +0000 (23:08 +0300)]
Sub filter: fixed initialization in http{} level (ticket #791).

If sub_filter directive was only specified at http{} level, sub filter
internal data remained uninitialized.  That would lead to a crash in runtime.

10 years agoThe HTTP/2 implementation (RFC 7240, 7241).
Valentin Bartenev [Fri, 11 Sep 2015 17:13:06 +0000 (20:13 +0300)]
The HTTP/2 implementation (RFC 7240, 7241).

The SPDY support is removed, as it's incompatible with the new module.

10 years agoCore: fixed segfault with null in wildcard hash names.
Maxim Dounin [Fri, 11 Sep 2015 14:04:40 +0000 (17:04 +0300)]
Core: fixed segfault with null in wildcard hash names.

A configuration like

    server { server_name .foo^@; }
    server { server_name .foo; }

resulted in a segmentation fault during construction of server names hash.

Reported by Markus Linnala.
Found with afl-fuzz.

10 years agoFixed segfault with incorrect location nesting.
Maxim Dounin [Fri, 11 Sep 2015 14:04:04 +0000 (17:04 +0300)]
Fixed segfault with incorrect location nesting.

A configuration with a named location inside a zero-length prefix
or regex location used to trigger a segmentation fault, as
ngx_http_core_location() failed to properly detect if a nested location
was created.  Example configuration to reproduce the problem:

    location "" {
        location @foo {}
    }

Fix is to not rely on a parent location name length, but rather check
command type we are currently parsing.

Identical fix is also applied to ngx_http_rewrite_if(), which used to
incorrectly assume the "if" directive is on server{} level in such
locations.

Reported by Markus Linnala.
Found with afl-fuzz.

10 years agoCache: check the whole cache key in addition to hashes.
Maxim Dounin [Fri, 11 Sep 2015 14:03:56 +0000 (17:03 +0300)]
Cache: check the whole cache key in addition to hashes.

This prevents a potential attack that discloses cached data if an attacker
will be able to craft a hash collision between some cache key the attacker
is allowed to access and another cache key with protected data.

See http://mailman.nginx.org/pipermail/nginx-devel/2015-September/007288.html.

Thanks to Gena Makhomed and Sergey Brester.

10 years agoUpstream: fixed cache send error handling.
Roman Arutyunyan [Thu, 3 Sep 2015 12:09:21 +0000 (15:09 +0300)]
Upstream: fixed cache send error handling.

The value of NGX_ERROR, returned from filter handlers, was treated as a generic
upstream error and changed to NGX_HTTP_INTERNAL_SERVER_ERROR before calling
ngx_http_finalize_request().  This resulted in "header already sent" alert
if header was already sent in filter handlers.

The problem appeared in 54e9b83d00f0 (1.7.5).

10 years agoFixed building --with-debug, broken by 6fce16b1fc10.
Valentin Bartenev [Wed, 2 Sep 2015 16:45:40 +0000 (19:45 +0300)]
Fixed building --with-debug, broken by 6fce16b1fc10.

10 years agoWriting to some file systems can be interrupted.
Valentin Bartenev [Wed, 2 Sep 2015 16:26:40 +0000 (19:26 +0300)]
Writing to some file systems can be interrupted.

At least such behavior was observed with CephFS, see:
http://mailman.nginx.org/pipermail/nginx/2015-July/048188.html.

10 years agoDecreased the NGX_HTTP_MAX_SUBREQUESTS limit.
Valentin Bartenev [Mon, 31 Aug 2015 20:26:33 +0000 (23:26 +0300)]
Decreased the NGX_HTTP_MAX_SUBREQUESTS limit.

There is no much sense in such a big value since its semantics
has been changed in 06e850859a26 to limit recursive subrequests.

10 years agoAdded protection against r->main->count overflow by subrequests.
Valentin Bartenev [Mon, 31 Aug 2015 20:25:16 +0000 (23:25 +0300)]
Added protection against r->main->count overflow by subrequests.

This overflow has become possible after the change in 06e850859a26,
since concurrent subrequests are not limited now and each of them is
counted in r->main->count.

10 years agoLimit recursive subrequests instead of simultaneous.
Valentin Bartenev [Sun, 23 Aug 2015 18:03:32 +0000 (21:03 +0300)]
Limit recursive subrequests instead of simultaneous.

10 years agoVersion bump.
Valentin Bartenev [Sun, 23 Aug 2015 18:03:29 +0000 (21:03 +0300)]
Version bump.

10 years agorelease-1.9.4 tag
Maxim Dounin [Tue, 18 Aug 2015 15:16:17 +0000 (18:16 +0300)]
release-1.9.4 tag

10 years agonginx-1.9.4-RELEASE release-1.9.4
Maxim Dounin [Tue, 18 Aug 2015 15:16:17 +0000 (18:16 +0300)]
nginx-1.9.4-RELEASE

10 years agoPerl: prototyping behavior explicitly specified.
Maxim Dounin [Tue, 18 Aug 2015 13:26:18 +0000 (16:26 +0300)]
Perl: prototyping behavior explicitly specified.

When prototyping behavior is not explicitly specified, xsubpp emits
a message to stderr asking to do so (see ticket #608).

10 years agoPerl: fixed warning about "sep" may be used uninitialized.
Maxim Dounin [Tue, 18 Aug 2015 13:26:05 +0000 (16:26 +0300)]
Perl: fixed warning about "sep" may be used uninitialized.

10 years agoUpdated OpenSSL used for win32 builds.
Maxim Dounin [Mon, 17 Aug 2015 15:09:20 +0000 (18:09 +0300)]
Updated OpenSSL used for win32 builds.

Note that as of OpenSSL 1.0.0, the "ms\do_ms" script (previously documented
to be used if one doesn't want to use the assembly language files) tries to
use MASM.  Additionally, OpenSSL 1.0.2 finally broke MASM support.  To fix
this, we now explicitly use "no-asm" in OpenSSL options.

10 years agoWin32: MSVC 2015 compatibility.
Maxim Dounin [Mon, 17 Aug 2015 15:09:17 +0000 (18:09 +0300)]
Win32: MSVC 2015 compatibility.

Resolved warnings about declarations that hide previous local declarations.
Warnings about WSASocketA() being deprecated resolved by explicit use of
WSASocketW() instead of WSASocket().  When compiling without IPv6 support,
WinSock deprecated warnings are disabled to allow use of gethostbyname().

10 years agoSub filter: support of variables in the strings to replace.
Dmitry Volyntsev [Mon, 17 Aug 2015 14:42:02 +0000 (17:42 +0300)]
Sub filter: support of variables in the strings to replace.

10 years agoSub filter: support of multiple strings to replace.
Dmitry Volyntsev [Mon, 17 Aug 2015 14:42:02 +0000 (17:42 +0300)]
Sub filter: support of multiple strings to replace.

10 years agoFixed wrong URI after try_files in nested location (ticket #97).
Maxim Dounin [Sun, 16 Aug 2015 07:51:34 +0000 (10:51 +0300)]
Fixed wrong URI after try_files in nested location (ticket #97).

The following configuration with alias, nested location and try_files
resulted in wrong file being used.  Request "/foo/test.gif" tried to
use "/tmp//foo/test.gif" instead of "/tmp/test.gif":

    location /foo/ {
        alias /tmp/;
        location ~ gif {
            try_files $uri =405;
        }
    }

Additionally, rev. c985d90a8d1f introduced a regression if
the "/tmp//foo/test.gif" file was found (ticket #768).  Resulting URI
was set to "gif?/foo/test.gif", as the code used clcf->name of current
location ("location ~ gif") instead of parent one ("location /foo/").

Fix is to use r->uri instead of clcf->name in all cases in the
ngx_http_core_try_files_phase() function.  It is expected to be
already matched and identical to the clcf->name of the right
location.

10 years agoFixed segfault with try_files introduced by c985d90a8d1f.
Maxim Dounin [Sun, 16 Aug 2015 07:51:16 +0000 (10:51 +0300)]
Fixed segfault with try_files introduced by c985d90a8d1f.

If alias was used in a location given by a regular expression,
nginx used to do wrong thing in try_files if a location name (i.e.,
regular expression) was an exact prefix of URI.  The following
configuration triggered a segmentation fault on a request to "/mail":

    location ~ /mail {
        alias /path/to/directory;
        try_files $uri =404;
    }

Reported by Per Hansson.

10 years agoCore: fixed potential division by zero when initializing hash.
Sergey Kandaurov [Thu, 13 Aug 2015 13:27:17 +0000 (16:27 +0300)]
Core: fixed potential division by zero when initializing hash.

Found by Clang Static Analyzer.

10 years agoCore: fixed style in the error message.
Sergey Kandaurov [Thu, 13 Aug 2015 13:27:13 +0000 (16:27 +0300)]
Core: fixed style in the error message.

10 years agoStream: fixed potential error log buffer overrun.
Vladimir Homutov [Thu, 13 Aug 2015 12:55:21 +0000 (15:55 +0300)]
Stream: fixed potential error log buffer overrun.

Found by Duan Jiong <djduanjiong@gmail.com>.

10 years agoStyle.
Vladimir Homutov [Wed, 12 Aug 2015 09:56:59 +0000 (12:56 +0300)]
Style.

10 years agoStream: the "tcp_nodelay" directive.
Vladimir Homutov [Mon, 10 Aug 2015 09:14:41 +0000 (12:14 +0300)]
Stream: the "tcp_nodelay" directive.

10 years agoCore: idle connections now closed only once on exiting.
Valentin Bartenev [Tue, 11 Aug 2015 13:28:55 +0000 (16:28 +0300)]
Core: idle connections now closed only once on exiting.

Iterating through all connections takes a lot of CPU time, especially
with large number of worker connections configured.  As a result
nginx processes used to consume CPU time during graceful shutdown.
To mitigate this we now only do a full scan for idle connections when
shutdown signal is received.

Transitions of connections to idle ones are now expected to be
avoided if the ngx_exiting flag is set.  The upstream keepalive module
was modified to follow this.

10 years agoFixed typo in the error message.
Andrei Belov [Tue, 11 Aug 2015 07:28:00 +0000 (10:28 +0300)]
Fixed typo in the error message.

10 years agoWorkaround for "configuration file test failed" under OpenVZ.
Gena Makhomed [Thu, 23 Jul 2015 18:00:03 +0000 (14:00 -0400)]
Workaround for "configuration file test failed" under OpenVZ.

If nginx was used under OpenVZ and a container with nginx was suspended
and resumed, configuration tests started to fail because of EADDRINUSE
returned from listen() instead of bind():

# nginx -t
nginx: the configuration file /etc/nginx/nginx.conf syntax is ok
nginx: [emerg] listen() to 0.0.0.0:80, backlog 511 failed (98: Address already in use)
nginx: configuration file /etc/nginx/nginx.conf test failed

With this change EADDRINUSE errors returned by listen() are handled
similarly to errors returned by bind(), and configuration tests work
fine in the same environment:

# nginx -t
nginx: the configuration file /etc/nginx/nginx.conf syntax is ok
nginx: configuration file /etc/nginx/nginx.conf test is successful

More details about OpenVZ suspend/resume bug:
https://bugzilla.openvz.org/show_bug.cgi?id=2470

10 years agoStream: deprecated proxy_downstream_buffer, proxy_upstream_buffer.
Roman Arutyunyan [Thu, 30 Jul 2015 23:43:48 +0000 (16:43 -0700)]
Stream: deprecated proxy_downstream_buffer, proxy_upstream_buffer.

The directive proxy_buffer_size should be used instead.

10 years agoStyle.
Roman Arutyunyan [Wed, 29 Jul 2015 21:36:36 +0000 (14:36 -0700)]
Style.

10 years agoStream: added proxy_buffer_size to set the size of data buffers.
Roman Arutyunyan [Wed, 29 Jul 2015 20:46:26 +0000 (13:46 -0700)]
Stream: added proxy_buffer_size to set the size of data buffers.

Both download and upload buffers now have the same size.  The old directives
proxy_downstream_buffer and proxy_upstream_buffer are removed.

10 years agoFixed strict aliasing warnings with old GCC versions.
Ruslan Ermilov [Thu, 16 Jul 2015 11:20:48 +0000 (14:20 +0300)]
Fixed strict aliasing warnings with old GCC versions.

10 years agoModify changes doc to acknowledge Lu is from Intel
Andrew Hutchings [Wed, 15 Jul 2015 19:43:41 +0000 (20:43 +0100)]
Modify changes doc to acknowledge Lu is from Intel

10 years agoVersion bump.
Maxim Dounin [Wed, 15 Jul 2015 19:56:03 +0000 (22:56 +0300)]
Version bump.

10 years agorelease-1.9.3 tag
Maxim Dounin [Tue, 14 Jul 2015 16:46:05 +0000 (19:46 +0300)]
release-1.9.3 tag

10 years agonginx-1.9.3-RELEASE release-1.9.3
Maxim Dounin [Tue, 14 Jul 2015 16:46:05 +0000 (19:46 +0300)]
nginx-1.9.3-RELEASE

10 years agoUpdated PCRE used for win32 builds.
Maxim Dounin [Tue, 14 Jul 2015 16:44:19 +0000 (19:44 +0300)]
Updated PCRE used for win32 builds.

10 years agoStream: renamed rate limiting directives.
Roman Arutyunyan [Tue, 14 Jul 2015 16:38:13 +0000 (09:38 -0700)]
Stream: renamed rate limiting directives.

The directive proxy_downstream_limit_rate is now called proxy_upload_rate.
The directive proxy_upstream_limit_rate is now called proxy_download_rate.

10 years agoUpdated OpenSSL used for win32 builds.
Maxim Dounin [Tue, 14 Jul 2015 07:13:51 +0000 (10:13 +0300)]
Updated OpenSSL used for win32 builds.

10 years agoOCSP stapling: fixed segfault without nextUpdate.
Maxim Dounin [Mon, 13 Jul 2015 22:10:25 +0000 (01:10 +0300)]
OCSP stapling: fixed segfault without nextUpdate.

OCSP responses may contain no nextUpdate.  As per RFC 6960, this means
that nextUpdate checks should be bypassed.  Handle this gracefully by
using NGX_MAX_TIME_T_VALUE as "valid" in such a case.

The problem was introduced by 6893a1007a7c (1.9.2).

Reported by Matthew Baldwin.

10 years agoOCSP stapling: fixed ssl_stapling_file (ticket #769).
Maxim Dounin [Tue, 7 Jul 2015 13:38:49 +0000 (16:38 +0300)]
OCSP stapling: fixed ssl_stapling_file (ticket #769).

Broken by 6893a1007a7c (1.9.2) during introduction of strict OCSP response
validity checks.  As stapling file is expected to be returned unconditionally,
fix is to set its validity to the maximum supported time.

Reported by Faidon Liambotis.

10 years agoStream: fixed possible integer overflow in rate limiting.
Valentin Bartenev [Thu, 2 Jul 2015 14:20:29 +0000 (17:20 +0300)]
Stream: fixed possible integer overflow in rate limiting.

10 years agoStream: fixed MSVC compilation warning.
Roman Arutyunyan [Thu, 2 Jul 2015 14:15:32 +0000 (17:15 +0300)]
Stream: fixed MSVC compilation warning.

Thanks to itpp2012.

10 years agoStream: upstream "connected" flag.
Roman Arutyunyan [Thu, 25 Jun 2015 09:36:52 +0000 (12:36 +0300)]
Stream: upstream "connected" flag.

Once upstream is connected, the upstream buffer is allocated.  Previously, the
proxy module used the buffer allocation status to check if upstream is
connected.  Now it's enough to check the flag.

10 years agoStream: upstream and downstream limit rates.
Roman Arutyunyan [Tue, 23 Jun 2015 17:17:48 +0000 (20:17 +0300)]
Stream: upstream and downstream limit rates.

10 years agoStream: common handler for upstream and downstream.
Roman Arutyunyan [Tue, 23 Jun 2015 17:17:47 +0000 (20:17 +0300)]
Stream: common handler for upstream and downstream.

10 years agoStream: avoid SSL_CTX_set_tmp_rsa_callback() call with LibreSSL.
Piotr Sikora [Thu, 18 Jun 2015 10:36:41 +0000 (03:36 -0700)]
Stream: avoid SSL_CTX_set_tmp_rsa_callback() call with LibreSSL.

Signed-off-by: Piotr Sikora <piotr@cloudflare.com>
10 years agoUpstream: fixed shared upstreams on win32.
Ruslan Ermilov [Mon, 15 Jun 2015 21:43:00 +0000 (00:43 +0300)]
Upstream: fixed shared upstreams on win32.

10 years agoStream: connection limiting module.
Vladimir Homutov [Thu, 18 Jun 2015 11:17:30 +0000 (14:17 +0300)]
Stream: connection limiting module.

stream {
    limit_conn_zone $binary_remote_addr zone=perip:1m;
    limit_conn_log_level error;

    server {
        ...
        limit_conn perip 1;
    }
}

10 years agoResolver: canceled resend timer on empty resend queues.
Sergey Kandaurov [Wed, 17 Jun 2015 14:57:34 +0000 (17:57 +0300)]
Resolver: canceled resend timer on empty resend queues.

This is specifically useful on graceful shutdown.

10 years agoConfigure: create missing intermediates for build directory.
Piotr Sikora [Thu, 11 Jun 2015 02:18:19 +0000 (19:18 -0700)]
Configure: create missing intermediates for build directory.

Signed-off-by: Piotr Sikora <piotr@cloudflare.com>
10 years agoConfigure: fix tests with multi-level relative build directory.
Ruslan Ermilov [Wed, 17 Jun 2015 11:15:27 +0000 (14:15 +0300)]
Configure: fix tests with multi-level relative build directory.

Based on a patch by Piotr Sikora.

10 years agoDisabled duplicate http, mail, and stream blocks.
Vladimir Homutov [Tue, 16 Jun 2015 20:28:38 +0000 (23:28 +0300)]
Disabled duplicate http, mail, and stream blocks.

Such configurations have very limited use, introduce various problems and
are not officially supported.

10 years agoVersion bump.
Vladimir Homutov [Tue, 16 Jun 2015 20:31:31 +0000 (23:31 +0300)]
Version bump.

10 years agorelease-1.9.2 tag
Maxim Dounin [Tue, 16 Jun 2015 14:49:40 +0000 (17:49 +0300)]
release-1.9.2 tag

10 years agonginx-1.9.2-RELEASE release-1.9.2
Maxim Dounin [Tue, 16 Jun 2015 14:49:39 +0000 (17:49 +0300)]
nginx-1.9.2-RELEASE

10 years agoPolished the recent change to the manpage.
Ruslan Ermilov [Tue, 16 Jun 2015 13:52:13 +0000 (16:52 +0300)]
Polished the recent change to the manpage.

10 years agoDocumentation: added -T option description to the man page.
Vladimir Homutov [Tue, 16 Jun 2015 13:28:56 +0000 (16:28 +0300)]
Documentation: added -T option description to the man page.

11 years agoCore: store and dump processed configuration.
Vladimir Homutov [Thu, 14 May 2015 15:54:27 +0000 (18:54 +0300)]
Core: store and dump processed configuration.

If the -T option is passed, additionally to configuration test, configuration
files are output to stdout.

In the debug mode, configuration files are kept in memory and can be accessed
using a debugger.

10 years agoCore: added support for writing to stdout.
Vladimir Homutov [Tue, 16 Jun 2015 12:47:40 +0000 (15:47 +0300)]
Core: added support for writing to stdout.

10 years agoCore: renamed ngx_proxy_protocol_parse to ngx_proxy_protocol_read.
Roman Arutyunyan [Tue, 16 Jun 2015 10:45:19 +0000 (13:45 +0300)]
Core: renamed ngx_proxy_protocol_parse to ngx_proxy_protocol_read.

The new name is consistent with the ngx_proxy_protocol_write function.

10 years agoStream: client-side PROXY protocol.
Roman Arutyunyan [Tue, 16 Jun 2015 10:45:16 +0000 (13:45 +0300)]
Stream: client-side PROXY protocol.

The new directive "proxy_protocol" toggles sending out PROXY protocol header
to upstream once connection is established.

10 years agoStream: the "proxy_bind" directive.
Vladimir Homutov [Tue, 16 Jun 2015 06:02:45 +0000 (09:02 +0300)]
Stream: the "proxy_bind" directive.

10 years agoUpdated OpenSSL used for win32 builds.
Maxim Dounin [Mon, 15 Jun 2015 17:20:12 +0000 (20:20 +0300)]
Updated OpenSSL used for win32 builds.

10 years agoOCSP stapling: avoid sending expired responses (ticket #425).
Maxim Dounin [Thu, 11 Jun 2015 17:42:39 +0000 (20:42 +0300)]
OCSP stapling: avoid sending expired responses (ticket #425).

10 years agoMoved ngx_http_parse_time() to core, renamed accordingly.
Maxim Dounin [Thu, 11 Jun 2015 17:42:31 +0000 (20:42 +0300)]
Moved ngx_http_parse_time() to core, renamed accordingly.

The function is now called ngx_parse_http_time(), and can be used by
any code to parse HTTP-style date and time.  In particular, it will be
used for OCSP stapling.

For compatibility, a macro to map ngx_http_parse_time() to the new name
provided for a while.

10 years agoRemoved unused ngx_http_get_time() declaration.
Maxim Dounin [Thu, 11 Jun 2015 17:42:24 +0000 (20:42 +0300)]
Removed unused ngx_http_get_time() declaration.

10 years agoConfigure: added gcc5 to the list of known GCC versions.
Valentin Bartenev [Wed, 10 Jun 2015 16:18:20 +0000 (19:18 +0300)]
Configure: added gcc5 to the list of known GCC versions.

10 years agoConfigure: search OpenSSL in a bunch of standard places.
Ruslan Ermilov [Wed, 10 Jun 2015 09:25:45 +0000 (12:25 +0300)]
Configure: search OpenSSL in a bunch of standard places.

10 years agoConfigure: moved NGX_SBIN_PATH variable initialization.
Ruslan Ermilov [Wed, 10 Jun 2015 09:25:31 +0000 (12:25 +0300)]
Configure: moved NGX_SBIN_PATH variable initialization.

It's now initialized in auto/options like the rest of variables
for system paths.

As a side effect, the currently unused macro NGX_SBIN_PATH now
gets the correct value.

10 years agoStream: access module.
Vladimir Homutov [Thu, 4 Jun 2015 10:04:12 +0000 (13:04 +0300)]
Stream: access module.

stream {
    server {
        ...
        allow 127.0.0.1;
        deny all;
    }
}

10 years agoStream: added postconfiguration method to stream modules.
Vladimir Homutov [Tue, 9 Jun 2015 10:00:45 +0000 (13:00 +0300)]
Stream: added postconfiguration method to stream modules.

10 years agoMail: listen backlog=.
Ruslan Ermilov [Mon, 8 Jun 2015 20:13:56 +0000 (23:13 +0300)]
Mail: listen backlog=.

10 years agoStream: listen backlog=.
Ruslan Ermilov [Mon, 8 Jun 2015 20:13:33 +0000 (23:13 +0300)]
Stream: listen backlog=.

10 years agoMail: embed ngx_mail_listen_t into ngx_mail_conf_addr_t.
Ruslan Ermilov [Mon, 8 Jun 2015 20:11:58 +0000 (23:11 +0300)]
Mail: embed ngx_mail_listen_t into ngx_mail_conf_addr_t.

10 years agoStream: embed ngx_stream_listen_t into ngx_stream_conf_addr_t.
Ruslan Ermilov [Mon, 8 Jun 2015 20:11:42 +0000 (23:11 +0300)]
Stream: embed ngx_stream_listen_t into ngx_stream_conf_addr_t.

10 years agoStream: fixed "reuseport" to actually work.
Ruslan Ermilov [Fri, 5 Jun 2015 20:03:13 +0000 (23:03 +0300)]
Stream: fixed "reuseport" to actually work.

10 years agoAdded the REQUEST_SCHEME parameter.
Maxim Dounin [Fri, 5 Jun 2015 19:23:26 +0000 (22:23 +0300)]
Added the REQUEST_SCHEME parameter.

The REQUEST_SCHEME parameter was introduced in Apache 2.3.11 and seems
to be used by some scripts now.  It looks more logical than previously
used HTTPS.

10 years agoUpstream keepalive: reduced diffs to the plus version of nginx.
Roman Arutyunyan [Thu, 4 Jun 2015 20:46:44 +0000 (23:46 +0300)]
Upstream keepalive: reduced diffs to the plus version of nginx.

10 years agoStyle.
Maxim Dounin [Fri, 5 Jun 2015 14:10:34 +0000 (17:10 +0300)]
Style.

10 years agoEvent pipe: call ngx_handle_read_event() with a proper flags type.
Sergey Kandaurov [Wed, 3 Jun 2015 16:12:26 +0000 (19:12 +0300)]
Event pipe: call ngx_handle_read_event() with a proper flags type.

The change was missed in f69d1aab6a0f.

10 years agoFixed misspellings of the word "dependencies".
Ruslan Ermilov [Wed, 3 Jun 2015 05:23:35 +0000 (08:23 +0300)]
Fixed misspellings of the word "dependencies".

10 years agoFixed excessive memory usage while parsing configuration.
Valentin Bartenev [Mon, 1 Jun 2015 18:08:56 +0000 (21:08 +0300)]
Fixed excessive memory usage while parsing configuration.

The b->pos points to the next symbol here.

Reported by ilexshen.

10 years agoFixed spelling in change logs.
Valentin Bartenev [Mon, 1 Jun 2015 13:58:07 +0000 (16:58 +0300)]
Fixed spelling in change logs.

10 years agoFixed bullying style of comments.
Ruslan Ermilov [Fri, 29 May 2015 06:26:33 +0000 (09:26 +0300)]
Fixed bullying style of comments.

10 years agoVersion bump.
Ruslan Ermilov [Fri, 29 May 2015 06:26:27 +0000 (09:26 +0300)]
Version bump.

10 years agorelease-1.9.1 tag
Maxim Dounin [Tue, 26 May 2015 13:49:51 +0000 (16:49 +0300)]
release-1.9.1 tag

10 years agonginx-1.9.1-RELEASE release-1.9.1
Maxim Dounin [Tue, 26 May 2015 13:49:50 +0000 (16:49 +0300)]
nginx-1.9.1-RELEASE

10 years agoDisabled SSLv3 by default (ticket #653).
Maxim Dounin [Mon, 25 May 2015 14:58:20 +0000 (17:58 +0300)]
Disabled SSLv3 by default (ticket #653).

10 years agoConfigure: GNU Hurd properly recognized.
Maxim Dounin [Mon, 25 May 2015 14:58:13 +0000 (17:58 +0300)]
Configure: GNU Hurd properly recognized.

With this change it's no longer needed to pass -D_GNU_SOURCE manually,
and -D_FILE_OFFSET_BITS=64 is set to use 64-bit off_t.

Note that nginx currently fails to work properly with master process
enabled on GNU Hurd, as fcntl(F_SETOWN) returns EOPNOTSUPP for sockets
as of GNU Hurd 0.6.  Additionally, our strerror() preloading doesn't
work well with GNU Hurd, as it uses large numbers for most errors.

10 years agoFixed reuseport with accept_mutex.
Maxim Dounin [Thu, 21 May 2015 16:39:11 +0000 (19:39 +0300)]
Fixed reuseport with accept_mutex.

10 years agoUpstream: report to error_log when max_fails is reached.
Ruslan Ermilov [Wed, 20 May 2015 19:44:00 +0000 (22:44 +0300)]
Upstream: report to error_log when max_fails is reached.

This can be useful to understand why "no live upstreams" happens,
in particular.

10 years agoThe "reuseport" option of the "listen" directive.
Maxim Dounin [Wed, 20 May 2015 12:51:56 +0000 (15:51 +0300)]
The "reuseport" option of the "listen" directive.

When configured, an individual listen socket on a given address is
created for each worker process.  This allows to reduce in-kernel lock
contention on configurations with high accept rates, resulting in better
performance.  As of now it works on Linux and DragonFly BSD.

Note that on Linux incoming connection requests are currently tied up
to a specific listen socket, and if some sockets are closed, connection
requests will be reset, see https://lwn.net/Articles/542629/.  With
nginx, this may happen if the number of worker processes is reduced.
There is no such problem on DragonFly BSD.

Based on previous work by Sepherosa Ziehau and Yingqi Lu.

10 years agoSimplified ngx_http_init_listening().
Maxim Dounin [Wed, 20 May 2015 12:51:28 +0000 (15:51 +0300)]
Simplified ngx_http_init_listening().

There is no need to set "i" to 0, as it's expected to be 0 assuming
the bindings are properly sorted, and we already rely on this when
explicitly set hport->naddrs to 1.  Remaining conditional code is
replaced with identical "hport->naddrs = i + 1".

Identical modifications are done in the mail and stream modules,
in the ngx_mail_optimize_servers() and ngx_stream_optimize_servers()
functions, respectively.

No functional changes.

10 years agoIntroduced worker number, ngx_worker.
Maxim Dounin [Wed, 20 May 2015 12:51:21 +0000 (15:51 +0300)]
Introduced worker number, ngx_worker.

10 years agoConfigure: style.
Maxim Dounin [Wed, 20 May 2015 12:51:13 +0000 (15:51 +0300)]
Configure: style.