]> git.kaiwu.me - nginx.git/log
nginx.git
10 years agoHTTP/2: fixed splitting of response headers on CONTINUATION frames.
Valentin Bartenev [Sun, 27 Sep 2015 23:32:44 +0000 (02:32 +0300)]
HTTP/2: fixed splitting of response headers on CONTINUATION frames.

Previous code has been based on assumption that the header block can only be
splitted at the borders of individual headers.  That wasn't the case and might
result in emitting frames bigger than the frame size limit.

The current approach is to split header blocks by the frame size limit.

10 years agoHTTP/2: introduced NGX_HTTP_V2_ENCODE_* macros.
Valentin Bartenev [Mon, 26 Oct 2015 14:43:08 +0000 (17:43 +0300)]
HTTP/2: introduced NGX_HTTP_V2_ENCODE_* macros.

No functional changes.

10 years agoHTTP/2: simplified producing of the Last-Modified header.
Valentin Bartenev [Mon, 26 Oct 2015 14:43:08 +0000 (17:43 +0300)]
HTTP/2: simplified producing of the Last-Modified header.

10 years agoHTTP/2: fixed header block size calculation.
Valentin Bartenev [Mon, 26 Oct 2015 14:43:08 +0000 (17:43 +0300)]
HTTP/2: fixed header block size calculation.

10 years agoHTTP/2: fix handling of connection errors.
Piotr Sikora [Fri, 2 Oct 2015 03:25:55 +0000 (20:25 -0700)]
HTTP/2: fix handling of connection errors.

Previously, nginx worker would crash because of a double free
if client disconnected or timed out before sending all headers.

Found with afl-fuzz.

Signed-off-by: Piotr Sikora <piotrsikora@google.com>
10 years agoHTTP/2: fix indirect reprioritization.
Piotr Sikora [Fri, 2 Oct 2015 03:25:55 +0000 (20:25 -0700)]
HTTP/2: fix indirect reprioritization.

Previously, streams that were indirectly reprioritized (either because of
a new exclusive dependency on their parent or because of removal of their
parent from the dependency tree), didn't have their pointer to the parent
node updated.

This broke detection of circular dependencies and, as a result, nginx
worker would crash due to stack overflow whenever such dependency was
introduced.

Found with afl-fuzz.

Signed-off-by: Piotr Sikora <piotrsikora@google.com>
10 years agoHTTP/2: reject self-dependent streams.
Piotr Sikora [Fri, 2 Oct 2015 03:25:55 +0000 (20:25 -0700)]
HTTP/2: reject self-dependent streams.

Per RFC7540, a stream cannot depend on itself.

Previously, this requirement was enforced on PRIORITY frames, but not on
HEADERS frames and due to the implementation details nginx worker would
crash (stack overflow) while opening self-dependent stream.

Found with afl-fuzz.

Signed-off-by: Piotr Sikora <piotrsikora@google.com>
10 years agoCore: read/write locks are also required by the Stream module.
Piotr Sikora [Sat, 24 Oct 2015 01:21:33 +0000 (18:21 -0700)]
Core: read/write locks are also required by the Stream module.

Signed-off-by: Piotr Sikora <piotrsikora@google.com>
10 years agoConfigure: style fixes for autoconf.err.
Piotr Sikora [Sat, 24 Oct 2015 01:21:33 +0000 (18:21 -0700)]
Configure: style fixes for autoconf.err.

Signed-off-by: Piotr Sikora <piotrsikora@google.com>
10 years agoHTTP/2: improved error handling while parsing integers.
Valentin Bartenev [Tue, 20 Oct 2015 18:28:38 +0000 (21:28 +0300)]
HTTP/2: improved error handling while parsing integers.

The case when an integer is out of frame bounds should be checked first
as a more accurate error.

10 years agoHTTP/2: improved HPACK integer parsing code readability.
Ruslan Ermilov [Tue, 20 Oct 2015 18:26:38 +0000 (21:26 +0300)]
HTTP/2: improved HPACK integer parsing code readability.

No functional changes.

10 years agoWin32: timer_resolution now ignored with select.
Maxim Dounin [Tue, 20 Oct 2015 15:16:18 +0000 (18:16 +0300)]
Win32: timer_resolution now ignored with select.

As setitimer() isn't available on Windows, time wasn't updated at all
if timer_resolution was used with the select event method.  Fix is
to ignore timer_resolution in such cases.

10 years agoWin32: fixed build with MinGW and MinGW-w64 gcc.
Kouhei Sutou [Sat, 17 Oct 2015 12:41:02 +0000 (21:41 +0900)]
Win32: fixed build with MinGW and MinGW-w64 gcc.

This change fixes the "comparison between signed and unsigned integer
expressions" warning, introduced in 5e6142609e48 (1.9.4).

10 years agoStyle: unneeded casts of cf->args->elts removed.
Maxim Dounin [Mon, 19 Oct 2015 20:04:49 +0000 (23:04 +0300)]
Style: unneeded casts of cf->args->elts removed.

10 years agoFixed variables prefix comparison.
Maxim Dounin [Mon, 19 Oct 2015 18:28:17 +0000 (21:28 +0300)]
Fixed variables prefix comparison.

Variable names are not null-terminated, so using ngx_strncmp() without
extra length checks is wrong.

Reported by Markus Linnala,
http://mailman.nginx.org/pipermail/nginx-devel/2015-August/007211.html.

10 years agoFixed handling of empty root.
Maxim Dounin [Mon, 19 Oct 2015 18:28:02 +0000 (21:28 +0300)]
Fixed handling of empty root.

Previously, a configuration with "root" set to an empty string tried test
a character at clcf->root.data[-1].  Additional test added to make sure
this won't happen.

Reported by Markus Linnala, see
http://mailman.nginx.org/pipermail/nginx-devel/2015-August/007210.html.

10 years agoSSL: preserve default server context in connection (ticket #235).
Maxim Dounin [Mon, 19 Oct 2015 18:22:38 +0000 (21:22 +0300)]
SSL: preserve default server context in connection (ticket #235).

This context is needed for shared sessions cache to work in configurations
with multiple virtual servers sharing the same port.  Unfortunately, OpenSSL
does not provide an API to access the session context, thus storing it
separately.

In collaboration with Vladimir Homutov.

10 years agoHTTP/2: fixed parsing of literal header fields without indexing.
Valentin Bartenev [Mon, 19 Oct 2015 13:16:47 +0000 (16:16 +0300)]
HTTP/2: fixed parsing of literal header fields without indexing.

10 years agoSSL: handled long string truncation in ngx_ssl_error().
Vladimir Homutov [Wed, 7 Oct 2015 19:19:42 +0000 (22:19 +0300)]
SSL: handled long string truncation in ngx_ssl_error().

If no space left in buffer after adding formatting symbols, error message
could be left without terminating null.  The fix is to output message using
actual length.

10 years agoStream: delete proxy connection timer after SSL handshake.
Ruslan Ermilov [Tue, 6 Oct 2015 05:57:09 +0000 (08:57 +0300)]
Stream: delete proxy connection timer after SSL handshake.

The timer remained active and could drop active SSL connection.

10 years agoExtract out version info function.
Kurtis Nusbaum [Sun, 12 Jul 2015 15:31:38 +0000 (08:31 -0700)]
Extract out version info function.

The code for displaying version info and configuration info seemed to be
cluttering up the main function. I was finding it hard to read main. This
extracts out all of the logic for displaying version and configuration info
into its own function, thus making main easier to read.

10 years agoHTTP/2: fixed $server_protocol value (ticket #800).
Valentin Bartenev [Mon, 28 Sep 2015 17:02:05 +0000 (20:02 +0300)]
HTTP/2: fixed $server_protocol value (ticket #800).

10 years agoSSL: compatibility with OpenSSL master branch.
Maxim Dounin [Thu, 24 Sep 2015 14:19:08 +0000 (17:19 +0300)]
SSL: compatibility with OpenSSL master branch.

RAND_pseudo_bytes() is deprecated in the OpenSSL master branch, so the only
use was changed to RAND_bytes().  Access to internal structures is no longer
possible, so now we don't try to set SSL3_FLAGS_NO_RENEGOTIATE_CIPHERS even
if it's defined.

10 years agoVersion bump.
Maxim Dounin [Thu, 24 Sep 2015 14:18:42 +0000 (17:18 +0300)]
Version bump.

10 years agorelease-1.9.5 tag
Maxim Dounin [Tue, 22 Sep 2015 14:36:22 +0000 (17:36 +0300)]
release-1.9.5 tag

10 years agonginx-1.9.5-RELEASE release-1.9.5
Maxim Dounin [Tue, 22 Sep 2015 14:36:21 +0000 (17:36 +0300)]
nginx-1.9.5-RELEASE

10 years agoStyle.
Maxim Dounin [Tue, 22 Sep 2015 14:09:50 +0000 (17:09 +0300)]
Style.

10 years agoIncreased the default number of output buffers.
Valentin Bartenev [Tue, 15 Sep 2015 14:49:15 +0000 (17:49 +0300)]
Increased the default number of output buffers.

Since an output buffer can only be used for either reading or sending, small
amounts of data left from the previous operation (due to some limits) must be
sent before nginx will be able to read further into the buffer.  Using only
one output buffer can result in suboptimal behavior that manifests itself in
forming and sending too small chunks of data.  This is particularly painful
with SPDY (or HTTP/2) where each such chunk needs to be prefixed with some
header.

The default flow-control window in HTTP/2 is 64k minus one bytes.  With one
32k output buffer this results is one byte left after exhausting the window.
With two 32k buffers the data will be read into the second free buffer before
sending, thus the minimum output is increased to 32k + 1 bytes which is much
better.

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.