]> git.kaiwu.me - nginx.git/log
nginx.git
11 years agonginx-1.7.8-RELEASE release-1.7.8
Maxim Dounin [Tue, 2 Dec 2014 13:02:14 +0000 (16:02 +0300)]
nginx-1.7.8-RELEASE

11 years agoTrailing spaces removed, typo fixed.
Maxim Dounin [Tue, 2 Dec 2014 04:01:37 +0000 (07:01 +0300)]
Trailing spaces removed, typo fixed.

11 years agoCache: proper wakeup of subrequests.
Maxim Dounin [Tue, 2 Dec 2014 02:54:56 +0000 (05:54 +0300)]
Cache: proper wakeup of subrequests.

In case of a cache lock timeout and in the aio handler we now call
r->write_event_handler() instead of a connection write handler,
to make sure to run appropriate subrequest.  Previous code failed to run
inactive subrequests and hence resulted in suboptimal behaviour, see
report by Yichun Zhang:

http://mailman.nginx.org/pipermail/nginx-devel/2013-October/004435.html

(Infinite hang claimed in the report seems impossible without 3rd party
modules, as subrequests will be eventually woken up by the postpone filter.)

11 years agoUpstream: improved subrequest logging.
Maxim Dounin [Tue, 2 Dec 2014 02:54:54 +0000 (05:54 +0300)]
Upstream: improved subrequest logging.

To ensure proper logging make sure to set current_request in all event
handlers, including resolve, ssl handshake, cache lock wait timer and
aio read handlers.  A macro ngx_http_set_log_request() introduced to
simplify this.

11 years agoAccess log: restricted "log_format" to "http" level.
Sergey Kandaurov [Mon, 1 Dec 2014 11:51:36 +0000 (14:51 +0300)]
Access log: restricted "log_format" to "http" level.

Specifying the "log_format" directive on levels other than "http"
is deprecated since 73d37e1ccb91 (1.1.11).

11 years agoWrite filter: fixed handling of sync bufs (ticket #132).
Maxim Dounin [Fri, 28 Nov 2014 13:58:39 +0000 (16:58 +0300)]
Write filter: fixed handling of sync bufs (ticket #132).

11 years agoFixed post_action to not trigger "header already sent" alert.
Maxim Dounin [Fri, 28 Nov 2014 13:57:50 +0000 (16:57 +0300)]
Fixed post_action to not trigger "header already sent" alert.

The alert was introduced in 03ff14058272 (1.5.4), and was triggered on each
post_action invocation.

There is no real need to call header filters in case of post_action,
so return NGX_OK from ngx_http_send_header() if r->post_action is set.

11 years agoTypo.
Maxim Dounin [Fri, 28 Nov 2014 13:57:23 +0000 (16:57 +0300)]
Typo.

11 years agoSPDY: push pending data while closing a stream as with keepalive.
Valentin Bartenev [Fri, 21 Nov 2014 19:51:49 +0000 (22:51 +0300)]
SPDY: push pending data while closing a stream as with keepalive.

This helps to avoid delays in sending the last chunk of data because
of bad interaction between Nagle's algorithm on nginx side and
delayed ACK on the client side.

Delays could also be caused by TCP_CORK/TCP_NOPUSH if SPDY was
working without SSL and sendfile() was used.

11 years agoSyslog: allowed underscore symbol in tag (ticket #667).
Vladimir Homutov [Thu, 20 Nov 2014 17:02:21 +0000 (20:02 +0300)]
Syslog: allowed underscore symbol in tag (ticket #667).

11 years agoResolver: fixed debug event logging.
Ruslan Ermilov [Thu, 20 Nov 2014 12:24:42 +0000 (15:24 +0300)]
Resolver: fixed debug event logging.

In 954867a2f0a6, we switched to using resolver node as the timer event data.
This broke debug event logging.

Replaced now unused ngx_resolver_ctx_t.ident with ngx_resolver_node_t.ident
so that ngx_event_ident() extracts something sensible when accessing
ngx_resolver_node_t as ngx_connection_t.

11 years agoResolver: fixed use-after-free memory access.
Ruslan Ermilov [Thu, 20 Nov 2014 12:24:40 +0000 (15:24 +0300)]
Resolver: fixed use-after-free memory access.

In 954867a2f0a6, we switched to using resolver node as the
timer event data, so make sure we do not free resolver node
memory until the corresponding timer is deleted.

11 years agoStyle.
Valentin Bartenev [Wed, 19 Nov 2014 18:46:01 +0000 (21:46 +0300)]
Style.

11 years agoFixed type of sendfile() return value on Linux.
Valentin Bartenev [Wed, 19 Nov 2014 18:18:13 +0000 (21:18 +0300)]
Fixed type of sendfile() return value on Linux.

There was no real problem since the amount of bytes can be sent is limited by
NGX_SENDFILE_MAXSIZE to less than 2G.  But that can be changed in the future

11 years agoMoved writev() handling code to a separate function.
Valentin Bartenev [Wed, 13 Aug 2014 11:11:45 +0000 (15:11 +0400)]
Moved writev() handling code to a separate function.

This reduces code duplication and unifies debug logging of the writev() syscall
among various send chain functions.

11 years agoMerged conditions in the ngx_*_sendfile_chain() functions.
Valentin Bartenev [Wed, 13 Aug 2014 11:11:45 +0000 (15:11 +0400)]
Merged conditions in the ngx_*_sendfile_chain() functions.

No functional changes.

11 years agoMoved the code for coalescing file buffers to a separate function.
Valentin Bartenev [Wed, 13 Aug 2014 11:11:45 +0000 (15:11 +0400)]
Moved the code for coalescing file buffers to a separate function.

11 years agoRefactored ngx_solaris_sendfilev_chain().
Valentin Bartenev [Wed, 19 Nov 2014 18:17:11 +0000 (21:17 +0300)]
Refactored ngx_solaris_sendfilev_chain().

Though ngx_solaris_sendfilev_chain() shouldn't suffer from the problem mentioned
in d1bde5c3c5d2 since currently IOV_MAX on Solaris is 16, but this follows the
change from 3d5717550371 in order to make the code look similar to other systems
and potentially eliminates the problem in the future.

11 years agoIntroduced the ngx_output_chain_to_iovec() function.
Valentin Bartenev [Tue, 7 Oct 2014 07:38:57 +0000 (11:38 +0400)]
Introduced the ngx_output_chain_to_iovec() function.

It deduplicates code of the send chain functions and uses only preallocated
memory, which completely solves the problem mentioned in d1bde5c3c5d2.

11 years agoRenamed ngx_handle_sent_chain() to ngx_chain_update_sent().
Valentin Bartenev [Wed, 19 Nov 2014 18:16:19 +0000 (21:16 +0300)]
Renamed ngx_handle_sent_chain() to ngx_chain_update_sent().

No functional changes.

11 years agoCache: add support for Cache-Control's s-maxage response directive.
Piotr Sikora [Wed, 19 Nov 2014 01:07:14 +0000 (17:07 -0800)]
Cache: add support for Cache-Control's s-maxage response directive.

Signed-off-by: Piotr Sikora <piotr@cloudflare.com>
11 years agoProxy: renamed and rearranged fields in proxy configuration.
Roman Arutyunyan [Wed, 19 Nov 2014 14:33:24 +0000 (17:33 +0300)]
Proxy: renamed and rearranged fields in proxy configuration.

No functional changes.

11 years agoUpstream: different header lists for cached and uncached requests.
Roman Arutyunyan [Wed, 19 Nov 2014 14:33:23 +0000 (17:33 +0300)]
Upstream: different header lists for cached and uncached requests.

The upstream modules remove and alter a number of client headers
before sending the request to upstream.  This set of headers is
smaller or even empty when cache is disabled.

It's still possible that a request in a cache-enabled location is
uncached, for example, if cache entry counter is below min_uses.
In this case it's better to alter a smaller set of headers and
pass more client headers to backend unchanged.  One of the benefits
is enabling server-side byte ranges in such requests.

11 years agoUpstream: moved header lists to separate structures.
Roman Arutyunyan [Wed, 19 Nov 2014 14:33:22 +0000 (17:33 +0300)]
Upstream: moved header lists to separate structures.

No functional changes.

11 years agoUpstream: moved header initializations to separate functions.
Roman Arutyunyan [Wed, 19 Nov 2014 14:33:21 +0000 (17:33 +0300)]
Upstream: moved header initializations to separate functions.

No functional changes.

11 years agoScgi: do not push redundant NULL element into conf->params.
Roman Arutyunyan [Wed, 19 Nov 2014 14:33:21 +0000 (17:33 +0300)]
Scgi: do not push redundant NULL element into conf->params.

11 years agoCache: proxy_cache_lock_age and friends.
Roman Arutyunyan [Tue, 18 Nov 2014 17:41:12 +0000 (20:41 +0300)]
Cache: proxy_cache_lock_age and friends.

Once this age is reached, the cache lock is discarded and another
request can acquire the lock.  Requests which failed to acquire
the lock are not allowed to cache the response.

11 years agoSPDY: fixed check for too long header name or value.
Valentin Bartenev [Fri, 7 Nov 2014 14:22:19 +0000 (17:22 +0300)]
SPDY: fixed check for too long header name or value.

For further progress a new buffer must be at least two bytes larger than
the remaining unparsed data.  One more byte is needed for null-termination
and another one for further progress.  Otherwise inflate() fails with
Z_BUF_ERROR.

11 years agoSPDY: improved debug logging of inflate() calls.
Valentin Bartenev [Fri, 7 Nov 2014 14:19:12 +0000 (17:19 +0300)]
SPDY: improved debug logging of inflate() calls.

11 years agoSSL: logging level of "inappropriate fallback" (ticket #662).
Maxim Dounin [Mon, 17 Nov 2014 13:38:48 +0000 (16:38 +0300)]
SSL: logging level of "inappropriate fallback" (ticket #662).

Patch by Erik Dubbelboer.

11 years agoUpstream: support named location for X-Accel-Redirect.
Toshikuni Fukaya [Tue, 4 Nov 2014 10:56:23 +0000 (19:56 +0900)]
Upstream: support named location for X-Accel-Redirect.

11 years agoUpstream: add "proxy_ssl_certificate" and friends.
Piotr Sikora [Thu, 30 Oct 2014 11:30:41 +0000 (04:30 -0700)]
Upstream: add "proxy_ssl_certificate" and friends.

Signed-off-by: Piotr Sikora <piotr@cloudflare.com>
11 years agoSPDY: fixed "too long header line" logging.
Maxim Dounin [Fri, 7 Nov 2014 14:38:55 +0000 (17:38 +0300)]
SPDY: fixed "too long header line" logging.

This fixes possible one byte buffer overrun and makes sure ellipsis are
always added, see 21043ce2a005.

11 years agoCache: removed dead store in ngx_http_file_cache_vary_header().
Maxim Dounin [Wed, 5 Nov 2014 15:53:26 +0000 (18:53 +0300)]
Cache: removed dead store in ngx_http_file_cache_vary_header().

Found by Clang Static Analyzer.

11 years agoAccess log: cancel the flush timer on graceful shutdown.
Valentin Bartenev [Mon, 25 Aug 2014 09:41:31 +0000 (13:41 +0400)]
Access log: cancel the flush timer on graceful shutdown.

Previously, it could prevent a worker process from exiting
for up to the configured flush timeout.

11 years agoEvents: introduced cancelable timers.
Valentin Bartenev [Wed, 13 Aug 2014 18:45:04 +0000 (22:45 +0400)]
Events: introduced cancelable timers.

11 years agoEvents: simplified cycle in ngx_event_expire_timers().
Valentin Bartenev [Mon, 25 Aug 2014 09:37:06 +0000 (13:37 +0400)]
Events: simplified cycle in ngx_event_expire_timers().

11 years agoEvents: removed broken thread support from event timers.
Valentin Bartenev [Mon, 25 Aug 2014 09:34:39 +0000 (13:34 +0400)]
Events: removed broken thread support from event timers.

It's mostly dead code.  And the idea of thread support for this task has
been deprecated.

11 years agoContrib: add more directives to vim syntax.
Peter Wu [Wed, 22 Oct 2014 13:31:19 +0000 (15:31 +0200)]
Contrib: add more directives to vim syntax.

uwsgi is not a third-party module anymore. 'split_clients' is a new
block directive type. The directives were automatically extracted from
the ngx_command_t arrays, sorted in the C locale and inserted.

Trailing spaces got removed at some places.

11 years agoSSL: simplified ssl_password_file error handling.
Sergey Kandaurov [Fri, 24 Oct 2014 11:28:00 +0000 (04:28 -0700)]
SSL: simplified ssl_password_file error handling.

Instead of collecting a number of the possible SSL_CTX_use_PrivateKey_file()
error codes that becomes more and more difficult with the rising variety of
OpenSSL versions and its derivatives, just continue with the next password.

Multiple passwords in a single ssl_password_file feature was broken after
recent OpenSSL changes (commit 4aac102f75b517bdb56b1bcfd0a856052d559f6e).

Affected OpenSSL releases: 0.9.8zc, 1.0.0o, 1.0.1j and 1.0.2-beta3.

Reported by Piotr Sikora.

11 years agoSPDY: stop emitting multiple empty header values.
Piotr Sikora [Mon, 27 Oct 2014 21:25:56 +0000 (14:25 -0700)]
SPDY: stop emitting multiple empty header values.

Previously, nginx would emit empty values in a header with multiple,
NULL-separated values.

This is forbidden by the SPDY specification, which requires headers to
have either a single (possibly empty) value or multiple, NULL-separated
non-empty values.

Signed-off-by: Piotr Sikora <piotr@cloudflare.com>
11 years agoVersion bump.
Valentin Bartenev [Tue, 28 Oct 2014 18:58:49 +0000 (21:58 +0300)]
Version bump.

11 years agorelease-1.7.7 tag
Maxim Dounin [Tue, 28 Oct 2014 15:04:46 +0000 (18:04 +0300)]
release-1.7.7 tag

11 years agonginx-1.7.7-RELEASE release-1.7.7
Maxim Dounin [Tue, 28 Oct 2014 15:04:46 +0000 (18:04 +0300)]
nginx-1.7.7-RELEASE

11 years agoUpdated OpenSSL used for win32 builds.
Maxim Dounin [Tue, 28 Oct 2014 14:35:00 +0000 (17:35 +0300)]
Updated OpenSSL used for win32 builds.

11 years agoWin32: made build-able with MinGW-w64 gcc.
Kouhei Sutou [Wed, 15 Oct 2014 12:15:01 +0000 (21:15 +0900)]
Win32: made build-able with MinGW-w64 gcc.

11 years agoUpstream: limited next_upstream time and tries when resolving DNS.
Gu Feng [Mon, 27 Oct 2014 11:52:03 +0000 (19:52 +0800)]
Upstream: limited next_upstream time and tries when resolving DNS.

When got multiple upstream IP addresses using DNS resolving, the number of
upstreams tries and the maxinum time spent for these tries were not affected.
This patch fixed it.

11 years agoWrite filter: stored delay in a variable, no functional changes.
Roman Arutyunyan [Tue, 28 Oct 2014 09:29:59 +0000 (12:29 +0300)]
Write filter: stored delay in a variable, no functional changes.

The code is now similar to ngx_event_pipe_read_upstream().

11 years agoUpstream: proxy_limit_rate and friends.
Roman Arutyunyan [Tue, 28 Oct 2014 09:29:59 +0000 (12:29 +0300)]
Upstream: proxy_limit_rate and friends.

The directives limit the upstream read rate.  For example,
"proxy_limit_rate 42" limits proxy upstream read rate to
42 bytes per second.

11 years agoCore: added limit to recv_chain().
Roman Arutyunyan [Tue, 28 Oct 2014 09:29:58 +0000 (12:29 +0300)]
Core: added limit to recv_chain().

11 years agoCache: normalization of some Vary headers.
Maxim Dounin [Mon, 27 Oct 2014 18:14:12 +0000 (21:14 +0300)]
Cache: normalization of some Vary headers.

Spaces in Accept-Charset, Accept-Encoding, and Accept-Language headers
are now ignored.  As per syntax of these headers spaces can only appear
in places where they are optional.

11 years agoCache: multiple variants of a resource now can be stored.
Maxim Dounin [Mon, 27 Oct 2014 18:14:10 +0000 (21:14 +0300)]
Cache: multiple variants of a resource now can be stored.

If a variant stored can't be used to respond to a request, the variant
hash is used as a secondary key.

Additionally, if we previously switched to a secondary key, while storing
a response to cache we check if the variant hash still apply.  If not, we
switch back to the original key, to handle cases when Vary changes.

11 years agoCache: c->reading flag introduced.
Maxim Dounin [Mon, 27 Oct 2014 18:14:07 +0000 (21:14 +0300)]
Cache: c->reading flag introduced.

It replaces c->buf in checks in ngx_http_file_cache_open(), making it possible
to reopen the file without clearing c->buf.  No functional changes.

11 years agoCache: hash of Vary headers now stored in cache.
Maxim Dounin [Mon, 27 Oct 2014 18:13:58 +0000 (21:13 +0300)]
Cache: hash of Vary headers now stored in cache.

To cache responses with Vary, we now calculate hash of headers listed
in Vary, and return the response from cache only if new request headers
match.

As of now, only one variant of the same resource can be stored in cache.

11 years agoCache: disable caching of responses with Vary (ticket #118).
Maxim Dounin [Mon, 27 Oct 2014 18:13:39 +0000 (21:13 +0300)]
Cache: disable caching of responses with Vary (ticket #118).

The "proxy_ignore_header" directive now undersands the "Vary" parameter
to ignore the header as needed.

11 years agoGzip, gunzip: flush busy buffers if any.
Maxim Dounin [Wed, 15 Oct 2014 18:57:23 +0000 (22:57 +0400)]
Gzip, gunzip: flush busy buffers if any.

Previous code resulted in transfer stalls when client happened
to read all the data in buffers at once, while all gzip buffers
were exhausted (but ctx->nomem wasn't set).  Make sure to call
next body filter at least once per call if there are busy buffers.

Additionally, handling of calls with NULL chain was changed to follow
the same logic, i.e., next body filter is only called with NULL chain
if there are busy buffers.  This is expected to fix "output chain is empty"
alerts as reported by some users after c52a761a2029 (1.5.7).

11 years agoStyle.
Maxim Dounin [Tue, 14 Oct 2014 16:19:36 +0000 (20:19 +0400)]
Style.

11 years agoUpstream: proxy_force_ranges and friends.
Roman Arutyunyan [Tue, 14 Oct 2014 14:32:01 +0000 (18:32 +0400)]
Upstream: proxy_force_ranges and friends.

The directives enable byte ranges for both cached and uncached
responses regardless of backend headers.

11 years agoWin32: suppressed warnings by "-Werror=sign-compare".
Kouhei Sutou [Sat, 11 Oct 2014 12:09:29 +0000 (21:09 +0900)]
Win32: suppressed warnings by "-Werror=sign-compare".

11 years agoWin32: fixed wrong type cast.
Kouhei Sutou [Sat, 11 Oct 2014 11:56:35 +0000 (20:56 +0900)]
Win32: fixed wrong type cast.

GetQueuedCompletionStatus() document on MSDN says the
following signature:

    http://msdn.microsoft.com/en-us/library/windows/desktop/aa364986.aspx

    BOOL WINAPI GetQueuedCompletionStatus(
      _In_   HANDLE CompletionPort,
      _Out_  LPDWORD lpNumberOfBytes,
      _Out_  PULONG_PTR lpCompletionKey,
      _Out_  LPOVERLAPPED *lpOverlapped,
      _In_   DWORD dwMilliseconds
    );

In the latest specification, the type of the third argument
(lpCompletionKey) is PULONG_PTR not LPDWORD.

11 years agoFixed possible buffer overrun in "too long header line" logging.
Maxim Dounin [Wed, 8 Oct 2014 13:16:04 +0000 (17:16 +0400)]
Fixed possible buffer overrun in "too long header line" logging.

Additionally, ellipsis now always added to make it clear that
the header logged is incomplete.

Reported by Daniil Bondarev.

11 years agoCore: fixed buffer overrun when hash max_size reached.
Yichun Zhang [Thu, 2 Oct 2014 19:00:17 +0000 (12:00 -0700)]
Core: fixed buffer overrun when hash max_size reached.

11 years agoUpstream: fix $upstream_cache_last_modified variable.
Piotr Sikora [Wed, 1 Oct 2014 22:48:53 +0000 (15:48 -0700)]
Upstream: fix $upstream_cache_last_modified variable.

Due to the u->headers_in.last_modified_time not being correctly initialized,
this variable was evaluated to "Thu, 01 Jan 1970 00:00:00 GMT" for responses
cached without the "Last-Modified" header which resulted in subsequent proxy
requests being sent with "If-Modified-Since: Thu, 01 Jan 1970 00:00:00 GMT"
header.

Signed-off-by: Piotr Sikora <piotr@cloudflare.com>
11 years agoFixed counting of sent bytes in the send chain functions on EINTR.
Valentin Bartenev [Wed, 27 Aug 2014 16:51:01 +0000 (20:51 +0400)]
Fixed counting of sent bytes in the send chain functions on EINTR.

Previously, a value of the "send" variable wasn't properly adjusted
in a rare case when syscall was interrupted by a signal.  As a result,
these functions could send less data than the limit allows.

11 years agoVersion bump.
Valentin Bartenev [Thu, 2 Oct 2014 18:36:27 +0000 (22:36 +0400)]
Version bump.

11 years agorelease-1.7.6 tag
Maxim Dounin [Tue, 30 Sep 2014 13:20:33 +0000 (17:20 +0400)]
release-1.7.6 tag

11 years agonginx-1.7.6-RELEASE release-1.7.6
Maxim Dounin [Tue, 30 Sep 2014 13:20:32 +0000 (17:20 +0400)]
nginx-1.7.6-RELEASE

11 years agoUpstream keepalive: reset c->sent on cached connections.
Maxim Dounin [Mon, 29 Sep 2014 18:27:45 +0000 (22:27 +0400)]
Upstream keepalive: reset c->sent on cached connections.

The c->sent is reset to 0 on each request by server-side http code,
so do the same on client side.  This allows to count number of bytes
sent in a particular request.

11 years agoLimit req: reduced number of parameters in the lookup function.
Valentin Bartenev [Wed, 24 Sep 2014 17:55:19 +0000 (21:55 +0400)]
Limit req: reduced number of parameters in the lookup function.

No functional changes.

11 years agoLimit req: use complex value in limit_req_zone.
Valentin Bartenev [Wed, 24 Sep 2014 17:55:19 +0000 (21:55 +0400)]
Limit req: use complex value in limit_req_zone.

One intentional side effect of this change is that key is allowed only
in the first position.  Previously, it was possible to specify the key
variable at any position, but that was never documented, and is contrary
with nginx configuration practice for positional parameters.

11 years agoLimit conn: aligned field names in structures.
Valentin Bartenev [Wed, 24 Sep 2014 17:55:19 +0000 (21:55 +0400)]
Limit conn: aligned field names in structures.

No functional changes.

11 years agoLimit conn: use complex value in limit_conn_zone (ticket #121).
Valentin Bartenev [Wed, 24 Sep 2014 17:55:19 +0000 (21:55 +0400)]
Limit conn: use complex value in limit_conn_zone (ticket #121).

One intentional side effect of this change is that key is allowed only
in the first position.  Previously, it was possible to specify the key
variable at any position, but that was never documented, and is contrary
to nginx configuration practice for positional parameters.

11 years agoLimit conn: removed deprecated "limit_zone" directive.
Valentin Bartenev [Wed, 24 Sep 2014 17:55:19 +0000 (21:55 +0400)]
Limit conn: removed deprecated "limit_zone" directive.

It's deprecated since 260d591cb6a3 (1.1.8).  The "limit_conn_zone" directive
should be used instead.

11 years agoSyslog: improved error handling of unix domain sockets.
Vladimir Homutov [Tue, 26 Aug 2014 10:56:54 +0000 (14:56 +0400)]
Syslog: improved error handling of unix domain sockets.

If a syslog daemon is restarted and the unix socket is used, further logging
might stop to work.  In case of send error, socket is closed, forcing
a reconnection at the next logging attempt.

11 years agoSyslog: enabled logging of send errors.
Vladimir Homutov [Mon, 1 Sep 2014 13:55:07 +0000 (17:55 +0400)]
Syslog: enabled logging of send errors.

The ngx_cycle->log is used when sending the message.  This allows to log syslog
send errors in another log.

Logging to syslog after its cleanup handler has been executed was prohibited.
Previously, this was possible from ngx_destroy_pool(), which resulted in error
messages caused by attempts to write into the closed socket.

The "processing" flag is renamed to "busy" to better match its semantics.

11 years agoAvoided to add duplicate hash key in ngx_http_types_slot().
Gu Feng [Wed, 17 Sep 2014 14:52:02 +0000 (22:52 +0800)]
Avoided to add duplicate hash key in ngx_http_types_slot().

11 years agoRemoved duplicate initialization of the "rev" variable.
Valentin Bartenev [Mon, 22 Sep 2014 15:48:23 +0000 (19:48 +0400)]
Removed duplicate initialization of the "rev" variable.

11 years agoGeneralized definitions of the number of preallocated iovec's.
Valentin Bartenev [Wed, 13 Aug 2014 11:11:45 +0000 (15:11 +0400)]
Generalized definitions of the number of preallocated iovec's.

No functional changes.

11 years agoReduced difference between the send chain functions.
Valentin Bartenev [Wed, 13 Aug 2014 11:11:45 +0000 (15:11 +0400)]
Reduced difference between the send chain functions.

No functional changes.  This follows the change from ad137a80919f.

11 years agoMerged implementations of ngx_readv_chain().
Valentin Bartenev [Wed, 13 Aug 2014 11:11:45 +0000 (15:11 +0400)]
Merged implementations of ngx_readv_chain().

There's no real need in two separate implementations,
with and without kqueue support.

11 years agoRemoved the "complete" variable from various send chain functions.
Valentin Bartenev [Wed, 13 Aug 2014 11:11:45 +0000 (15:11 +0400)]
Removed the "complete" variable from various send chain functions.

It was made redundant by the previous change, since the "sent" variable
is no longer modified.

11 years agoMoved the code for adjusting sent buffers in a separate function.
Valentin Bartenev [Wed, 13 Aug 2014 11:11:45 +0000 (15:11 +0400)]
Moved the code for adjusting sent buffers in a separate function.

11 years agoFixed writev() debug log message in ngx_darwin_sendfile_chain().
Valentin Bartenev [Wed, 13 Aug 2014 11:11:45 +0000 (15:11 +0400)]
Fixed writev() debug log message in ngx_darwin_sendfile_chain().

11 years agoUpstream: fixed file buffers reinit in ngx_http_upstream_reinit().
Roman Arutyunyan [Thu, 18 Sep 2014 12:37:16 +0000 (16:37 +0400)]
Upstream: fixed file buffers reinit in ngx_http_upstream_reinit().

Previously, a file buffer start position was reset to the file start.
Now it's reset to the previous file buffer end.  This fixes
reinitialization of requests having multiple successive parts of a
single file.  Such requests are generated by fastcgi module.

11 years agoFastCGI: fixed start pointers in request buffers.
Roman Arutyunyan [Thu, 18 Sep 2014 12:37:14 +0000 (16:37 +0400)]
FastCGI: fixed start pointers in request buffers.

The start pointers are used in ngx_http_upstream_reinit() to
reinit FastCGI requests.

11 years agoLimit req: don't truncate key value to 255 bytes.
Valentin Bartenev [Tue, 16 Sep 2014 17:12:51 +0000 (21:12 +0400)]
Limit req: don't truncate key value to 255 bytes.

While the module allows to use values up to 65535 bytes as a key,
that actually never worked properly.

11 years agoVersion bump.
Valentin Bartenev [Wed, 17 Sep 2014 08:04:47 +0000 (12:04 +0400)]
Version bump.

11 years agorelease-1.7.5 tag
Maxim Dounin [Tue, 16 Sep 2014 12:19:03 +0000 (16:19 +0400)]
release-1.7.5 tag

11 years agonginx-1.7.5-RELEASE release-1.7.5
Maxim Dounin [Tue, 16 Sep 2014 12:19:03 +0000 (16:19 +0400)]
nginx-1.7.5-RELEASE

11 years agoUpdated OpenSSL used for win32 builds.
Maxim Dounin [Mon, 15 Sep 2014 14:03:49 +0000 (18:03 +0400)]
Updated OpenSSL used for win32 builds.

11 years agoSSL: session id context now includes certificate hash.
Maxim Dounin [Mon, 15 Sep 2014 13:59:47 +0000 (17:59 +0400)]
SSL: session id context now includes certificate hash.

This prevents inappropriate session reuse in unrelated server{}
blocks, while preserving ability to restore sessions on other servers
when using TLS Session Tickets.

Additionally, session context is now set even if there is no session cache
configured.  This is needed as it's also used for TLS Session Tickets.

Thanks to Antoine Delignat-Lavaud and Piotr Sikora.

11 years agoAccess log: fixed the "if=" parameter with buffering (ticket #625).
Valentin Bartenev [Sat, 13 Sep 2014 17:47:13 +0000 (21:47 +0400)]
Access log: fixed the "if=" parameter with buffering (ticket #625).

It might not work if there were more than one "access_log" directives
pointed to the same file and duplicate buffer parameters.

11 years agoUpstream: limited next_upstream time and tries (ticket #544).
Roman Arutyunyan [Fri, 12 Sep 2014 14:50:47 +0000 (18:50 +0400)]
Upstream: limited next_upstream time and tries (ticket #544).

The new directives {proxy,fastcgi,scgi,uwsgi,memcached}_next_upstream_tries
and {proxy,fastcgi,scgi,uwsgi,memcached}_next_upstream_timeout limit
the number of upstreams tried and the maximum time spent for these tries
when searching for a valid upstream.

11 years agoUpstream: included backup peers into peer.tries.
Roman Arutyunyan [Fri, 12 Sep 2014 14:50:46 +0000 (18:50 +0400)]
Upstream: included backup peers into peer.tries.

Since peer.tries is never reset it can now be limited if required.

11 years agoUpstream keepalive: removed "single" parameter remnants.
Maxim Dounin [Thu, 11 Sep 2014 16:09:04 +0000 (20:09 +0400)]
Upstream keepalive: removed "single" parameter remnants.

The "single" parameter is deprecated and ignored since 5b5c07dee156 (1.3.2).

11 years agoAdded warning about unset cache keys.
Maxim Dounin [Thu, 11 Sep 2014 16:08:52 +0000 (20:08 +0400)]
Added warning about unset cache keys.

In fastcgi, scgi and uwsgi modules there are no default cache keys, and
using a cache without a cache key set is likely meaningless.

11 years agoStyle.
Maxim Dounin [Thu, 11 Sep 2014 16:08:45 +0000 (20:08 +0400)]
Style.

11 years agoUpstream: avoided directly terminating the connection.
FengGu [Wed, 13 Aug 2014 06:53:55 +0000 (14:53 +0800)]
Upstream: avoided directly terminating the connection.

When memory allocation failed in ngx_http_upstream_cache(), the connection
would be terminated directly in ngx_http_upstream_init_request().
Return a INTERNAL_SERVER_ERROR response instead.

11 years agoAdded ngx_init_setproctitle() return code check.
Maxim Dounin [Mon, 8 Sep 2014 17:36:09 +0000 (21:36 +0400)]
Added ngx_init_setproctitle() return code check.

The ngx_init_setproctitle() function, as used on systems without
setproctitle(3), may fail due to memory allocation errors, and
therefore its return code needs to be checked.

Reported by Markus Linnala.

11 years agoFixed ETag memory allocation error handling.
Maxim Dounin [Mon, 8 Sep 2014 17:36:03 +0000 (21:36 +0400)]
Fixed ETag memory allocation error handling.

The etag->hash must be set to 0 to avoid an empty ETag header being
returned with the 500 Internal Server Error page after the memory
allocation failure.

Reported by Markus Linnala.