Commit graph

5558 commits

Author SHA1 Message Date
Maxim Dounin
eb011ca407 release-1.9.4 tag 2015-08-18 18:16:17 +03:00
Maxim Dounin
a3255add74 nginx-1.9.4-RELEASE 2015-08-18 18:16:17 +03:00
Maxim Dounin
befc4bff20 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).
2015-08-18 16:26:18 +03:00
Maxim Dounin
055ba52508 Perl: fixed warning about "sep" may be used uninitialized. 2015-08-18 16:26:05 +03:00
Maxim Dounin
e37a514ae4 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.
2015-08-17 18:09:20 +03:00
Maxim Dounin
06a54b3a61 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().
2015-08-17 18:09:17 +03:00
Dmitry Volyntsev
83e24dfb14 Sub filter: support of variables in the strings to replace. 2015-08-17 17:42:02 +03:00
Dmitry Volyntsev
c7ce35a151 Sub filter: support of multiple strings to replace. 2015-08-17 17:42:02 +03:00
Maxim Dounin
a27f0af067 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.
2015-08-16 10:51:34 +03:00
Maxim Dounin
8bf94eb4a2 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.
2015-08-16 10:51:16 +03:00
Sergey Kandaurov
5b2bcdca20 Core: fixed potential division by zero when initializing hash.
Found by Clang Static Analyzer.
2015-08-13 16:27:17 +03:00
Sergey Kandaurov
442ff2ac97 Core: fixed style in the error message. 2015-08-13 16:27:13 +03:00
Vladimir Homutov
3ae90e44b5 Stream: fixed potential error log buffer overrun.
Found by Duan Jiong <djduanjiong@gmail.com>.
2015-08-13 15:55:21 +03:00
Vladimir Homutov
ea66206f04 Style. 2015-08-12 12:56:59 +03:00
Vladimir Homutov
7662432d69 Stream: the "tcp_nodelay" directive. 2015-08-10 12:14:41 +03:00
Valentin Bartenev
ae9be8fc6b 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.
2015-08-11 16:28:55 +03:00
Andrei Belov
88c2af46ab Fixed typo in the error message. 2015-08-11 10:28:00 +03:00
Gena Makhomed
f07deb44a8 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
2015-07-23 14:00:03 -04:00
Roman Arutyunyan
109f717153 Stream: deprecated proxy_downstream_buffer, proxy_upstream_buffer.
The directive proxy_buffer_size should be used instead.
2015-07-30 16:43:48 -07:00
Roman Arutyunyan
a950a01481 Style. 2015-07-29 14:36:36 -07:00
Roman Arutyunyan
2815836357 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.
2015-07-29 13:46:26 -07:00
Ruslan Ermilov
82e19c196c Fixed strict aliasing warnings with old GCC versions. 2015-07-16 14:20:48 +03:00
Andrew Hutchings
ec7772facf Modify changes doc to acknowledge Lu is from Intel 2015-07-15 20:43:41 +01:00
Maxim Dounin
db8e959f4e Version bump. 2015-07-15 22:56:03 +03:00
Maxim Dounin
dcf970ecbd release-1.9.3 tag 2015-07-14 19:46:05 +03:00
Maxim Dounin
7fdf3c1c79 nginx-1.9.3-RELEASE 2015-07-14 19:46:05 +03:00
Maxim Dounin
fe8d087623 Updated PCRE used for win32 builds. 2015-07-14 19:44:19 +03:00
Roman Arutyunyan
cc945f17f1 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.
2015-07-14 09:38:13 -07:00
Maxim Dounin
e8c9f3731c Updated OpenSSL used for win32 builds. 2015-07-14 10:13:51 +03:00
Maxim Dounin
3a75cc3038 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.
2015-07-14 01:10:25 +03:00
Maxim Dounin
cec200c26e 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.
2015-07-07 16:38:49 +03:00
Valentin Bartenev
abdcdca430 Stream: fixed possible integer overflow in rate limiting. 2015-07-02 17:20:29 +03:00
Roman Arutyunyan
0197065305 Stream: fixed MSVC compilation warning.
Thanks to itpp2012.
2015-07-02 17:15:32 +03:00
Roman Arutyunyan
c138128b55 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.
2015-06-25 12:36:52 +03:00
Roman Arutyunyan
6a72ceb695 Stream: upstream and downstream limit rates. 2015-06-23 20:17:48 +03:00
Roman Arutyunyan
f9a2aa9742 Stream: common handler for upstream and downstream. 2015-06-23 20:17:47 +03:00
Piotr Sikora
86efa1ecbe Stream: avoid SSL_CTX_set_tmp_rsa_callback() call with LibreSSL.
Signed-off-by: Piotr Sikora <piotr@cloudflare.com>
2015-06-18 03:36:41 -07:00
Ruslan Ermilov
d6ce2f87ed Upstream: fixed shared upstreams on win32. 2015-06-16 00:43:00 +03:00
Vladimir Homutov
0262c3d9c6 Stream: connection limiting module.
stream {
    limit_conn_zone $binary_remote_addr zone=perip:1m;
    limit_conn_log_level error;

    server {
        ...
        limit_conn perip 1;
    }
}
2015-06-18 14:17:30 +03:00
Sergey Kandaurov
95daabb1cb Resolver: canceled resend timer on empty resend queues.
This is specifically useful on graceful shutdown.
2015-06-17 17:57:34 +03:00
Piotr Sikora
b4127c9645 Configure: create missing intermediates for build directory.
Signed-off-by: Piotr Sikora <piotr@cloudflare.com>
2015-06-10 19:18:19 -07:00
Ruslan Ermilov
dc3691a751 Configure: fix tests with multi-level relative build directory.
Based on a patch by Piotr Sikora.
2015-06-17 14:15:27 +03:00
Vladimir Homutov
350b2b1f8b Disabled duplicate http, mail, and stream blocks.
Such configurations have very limited use, introduce various problems and
are not officially supported.
2015-06-16 23:28:38 +03:00
Vladimir Homutov
da0505b0a3 Version bump. 2015-06-16 23:31:31 +03:00
Maxim Dounin
43bcde296b release-1.9.2 tag 2015-06-16 17:49:40 +03:00
Maxim Dounin
b038e0e473 nginx-1.9.2-RELEASE 2015-06-16 17:49:39 +03:00
Ruslan Ermilov
14b98283e0 Polished the recent change to the manpage. 2015-06-16 16:52:13 +03:00
Vladimir Homutov
974d5bc0d2 Documentation: added -T option description to the man page. 2015-06-16 16:28:56 +03:00
Vladimir Homutov
1e21e6fe90 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.
2015-05-14 18:54:27 +03:00
Vladimir Homutov
8dbcdb257d Core: added support for writing to stdout. 2015-06-16 15:47:40 +03:00