]> git.kaiwu.me - nginx.git/log
nginx.git
11 years agoMail: fixed the duplicate listen address detection.
Ruslan Ermilov [Fri, 23 Jan 2015 12:23:29 +0000 (15:23 +0300)]
Mail: fixed the duplicate listen address detection.

11 years agoMail: fixed a comment.
Ruslan Ermilov [Fri, 23 Jan 2015 12:23:27 +0000 (15:23 +0300)]
Mail: fixed a comment.

11 years agoUpstream: detect port absence in fastcgi_pass with IP literal.
Ruslan Ermilov [Thu, 22 Jan 2015 13:23:32 +0000 (16:23 +0300)]
Upstream: detect port absence in fastcgi_pass with IP literal.

If fastcgi_pass (or any look-alike that doesn't imply a default
port) is specified as an IP literal (as opposed to a hostname),
port absence was not detected at configuration time and could
result in EADDRNOTAVAIL at run time.

Fixed this in such a way that configs like

http {
    server {
        location / {
            fastcgi_pass 127.0.0.1;
        }
    }

    upstream 127.0.0.1 {
        server 10.0.0.1:12345;
    }
}

still work.  That is, port absence check is delayed until after
we make sure there's no explicit upstream with such a name.

11 years agoVersion bump.
Ruslan Ermilov [Wed, 11 Feb 2015 12:51:03 +0000 (15:51 +0300)]
Version bump.

11 years agorelease-1.7.10 tag
Maxim Dounin [Tue, 10 Feb 2015 14:33:32 +0000 (17:33 +0300)]
release-1.7.10 tag

11 years agonginx-1.7.10-RELEASE release-1.7.10
Maxim Dounin [Tue, 10 Feb 2015 14:33:32 +0000 (17:33 +0300)]
nginx-1.7.10-RELEASE

11 years agoUpdated OpenSSL used for win32 builds.
Maxim Dounin [Tue, 10 Feb 2015 13:54:12 +0000 (16:54 +0300)]
Updated OpenSSL used for win32 builds.

11 years agoCore: fixed build on Tru64 UNIX.
Sergey Kandaurov [Mon, 9 Feb 2015 22:51:08 +0000 (01:51 +0300)]
Core: fixed build on Tru64 UNIX.

There was a typo in NGX_EACCES.

Reported by Goetz T. Fischer.

11 years agoFixed try_files directory test to match only a directory.
Damien Tournoud [Tue, 20 Jan 2015 23:26:32 +0000 (00:26 +0100)]
Fixed try_files directory test to match only a directory.

Historically, it was possible to match either a file or directory
in the following configuration:

    location / {
        try_files $uri/ =404;
    }

11 years agoCore: fixed a race resulting in extra sem_post()'s.
Roman Arutyunyan [Wed, 4 Feb 2015 13:22:43 +0000 (16:22 +0300)]
Core: fixed a race resulting in extra sem_post()'s.

The mtx->wait counter was not decremented if we were able to obtain the lock
right after incrementing it.  This resulted in unneeded sem_post() calls,
eventually leading to EOVERFLOW errors being logged, "sem_post() failed
while wake shmtx (75: Value too large for defined data type)".

To close the race, mtx->wait is now decremented if we obtain the lock right
after incrementing it in ngx_shmtx_lock().  The result can become -1 if a
concurrent ngx_shmtx_unlock() decrements mtx->wait before the added code does.
However, that only leads to one extra iteration in the next call of
ngx_shmtx_lock().

11 years agoCore: reverted prefix-based temp files (a9138c35120d).
Roman Arutyunyan [Mon, 2 Feb 2015 18:28:09 +0000 (21:28 +0300)]
Core: reverted prefix-based temp files (a9138c35120d).

The use_temp_path http cache feature is now implemented using a separate temp
hierarchy in cache directory.  Prefix-based temp files are no longer needed.

11 years agoCache: added temp_path to file cache.
Roman Arutyunyan [Mon, 2 Feb 2015 16:38:35 +0000 (19:38 +0300)]
Cache: added temp_path to file cache.

If use_temp_path is set to off, a subdirectory "temp" is created in the cache
directory.  It's used instead of proxy_temp_path and friends for caching
upstream response.

11 years agoCore: supported directory skipping in ngx_walk_tree().
Roman Arutyunyan [Mon, 2 Feb 2015 16:38:32 +0000 (19:38 +0300)]
Core: supported directory skipping in ngx_walk_tree().

If pre_tree_handler() returns NGX_DECLINED, the directory is ignored.

11 years agoFixed AIO handling in the output chain.
Valentin Bartenev [Wed, 28 Jan 2015 18:33:06 +0000 (21:33 +0300)]
Fixed AIO handling in the output chain.

The ctx->aio flag must be taken into account in the short path too.

11 years agoA bounds check of %N format on Windows.
Igor Sysoev [Tue, 27 Jan 2015 12:38:15 +0000 (15:38 +0300)]
A bounds check of %N format on Windows.
Thanks to Joe Bialek, Adam Zabrocki and Microsoft Vulnerability Research.

11 years agoUpstream: $upstream_header_time variable.
Vladimir Homutov [Wed, 14 Jan 2015 06:03:35 +0000 (09:03 +0300)]
Upstream: $upstream_header_time variable.

Keeps time spent on obtaining the header from an upstream server.  The value is
formatted similar to the $upstream_response_time variable.

11 years agoYear 2015.
Valentin Bartenev [Tue, 13 Jan 2015 17:13:16 +0000 (20:13 +0300)]
Year 2015.

11 years agoCore: added disk_full_time checks to error log.
Maxim Dounin [Tue, 13 Jan 2015 16:51:37 +0000 (19:51 +0300)]
Core: added disk_full_time checks to error log.

11 years agoFixed sendfile() trailers on OS X (8e903522c17a, 1.7.8).
Maxim Dounin [Tue, 13 Jan 2015 15:58:23 +0000 (18:58 +0300)]
Fixed sendfile() trailers on OS X (8e903522c17a, 1.7.8).

The trailer.count variable was not initialized if there was a header,
resulting in "sendfile() failed (22: Invalid argument)" alerts on OS X
if the "sendfile" directive was used.  The bug was introduced
in 8e903522c17a (1.7.8).

11 years agoUpstream: use_temp_path parameter of proxy_cache_path and friends.
Valentin Bartenev [Fri, 26 Dec 2014 13:22:59 +0000 (16:22 +0300)]
Upstream: use_temp_path parameter of proxy_cache_path and friends.

When set to "off", temporary files for cacheable responses will be stored
inside cache directory.

11 years agoCache: update variant while setting header.
Valentin Bartenev [Fri, 26 Dec 2014 13:22:56 +0000 (16:22 +0300)]
Cache: update variant while setting header.

Some parts of code related to handling variants of a resource moved into
a separate function that is called earlier.  This allows to use cache file
name as a prefix for temporary file in the following patch.

11 years agoCore: added prefix-based temporary files.
Valentin Bartenev [Fri, 26 Dec 2014 13:22:54 +0000 (16:22 +0300)]
Core: added prefix-based temporary files.

Now, if the "path" parameter is NULL, ngx_create_temp_file() will use
file->name as a predefined file path prefix.

11 years agoUnified handling of ngx_create_temp_file() return value.
Valentin Bartenev [Fri, 26 Dec 2014 13:22:50 +0000 (16:22 +0300)]
Unified handling of ngx_create_temp_file() return value.

The original check for NGX_AGAIN was surplus, since the function returns
only NGX_OK or NGX_ERROR.  Now it looks similar to other places.

No functional changes.

11 years agoTrailing space fix.
Maxim Dounin [Wed, 24 Dec 2014 16:02:58 +0000 (19:02 +0300)]
Trailing space fix.

11 years agoFixed building with musl libc (ticket #685).
Maxim Dounin [Wed, 24 Dec 2014 16:01:22 +0000 (19:01 +0300)]
Fixed building with musl libc (ticket #685).

11 years agoVersion bump.
Maxim Dounin [Wed, 24 Dec 2014 15:53:38 +0000 (18:53 +0300)]
Version bump.

11 years agorelease-1.7.9 tag
Maxim Dounin [Tue, 23 Dec 2014 15:28:38 +0000 (18:28 +0300)]
release-1.7.9 tag

11 years agonginx-1.7.9-RELEASE release-1.7.9
Maxim Dounin [Tue, 23 Dec 2014 15:28:37 +0000 (18:28 +0300)]
nginx-1.7.9-RELEASE

11 years agoUpstream: added variables support to proxy_cache and friends.
Valentin Bartenev [Mon, 22 Dec 2014 09:59:09 +0000 (12:59 +0300)]
Upstream: added variables support to proxy_cache and friends.

11 years agoUpstream: preset some cache configuration when bypassing.
Valentin Bartenev [Mon, 22 Dec 2014 09:59:06 +0000 (12:59 +0300)]
Upstream: preset some cache configuration when bypassing.

No functional changes.

11 years agoUpstream: refactored proxy_cache and friends.
Valentin Bartenev [Mon, 22 Dec 2014 09:59:02 +0000 (12:59 +0300)]
Upstream: refactored proxy_cache and friends.

The configuration handling code has changed to look similar to the proxy_store
directive and friends.  This simplifies adding variable support in the following
patch.

No functional changes.

11 years agoUpstream: mutually exclusive inheritance of "cache" and "store".
Valentin Bartenev [Mon, 22 Dec 2014 09:58:59 +0000 (12:58 +0300)]
Upstream: mutually exclusive inheritance of "cache" and "store".

Currently, storing and caching mechanisms cannot work together, and a
configuration error is thrown when the proxy_store and proxy_cache
directives (as well as their friends) are configured on the same level.

But configurations like in the example below were allowed and could result
in critical errors in the error log:

    proxy_store on;

    location / {
        proxy_cache one;
    }

Only proxy_store worked in this case.

For more predictable and errorless behavior these directives now prevent
each other from being inherited from the previous level.

11 years agoUpstream: simplified proxy_store and friends configuration code.
Valentin Bartenev [Mon, 22 Dec 2014 09:58:56 +0000 (12:58 +0300)]
Upstream: simplified proxy_store and friends configuration code.

This changes internal API related to handling of the "store"
flag in ngx_http_upstream_conf_t.  Previously, a non-null value
of "store_lengths" was enough to enable store functionality with
custom path.  Now, the "store" flag is also required to be set.

No functional changes.

11 years agoSSL: safeguard use of SSL3_FLAGS_NO_RENEGOTIATE_CIPHERS.
Lukas Tribus [Wed, 17 Dec 2014 14:12:50 +0000 (15:12 +0100)]
SSL: safeguard use of SSL3_FLAGS_NO_RENEGOTIATE_CIPHERS.

The flag was recently removed by BoringSSL.

11 years agoAutoindex: implemented XML output format.
Valentin Bartenev [Fri, 12 Dec 2014 17:25:42 +0000 (20:25 +0300)]
Autoindex: implemented XML output format.

11 years agoAutoindex: implemented JSON output format.
Valentin Bartenev [Fri, 12 Dec 2014 17:25:35 +0000 (20:25 +0300)]
Autoindex: implemented JSON output format.

11 years agoAutoindex: rendering code moved to a separate function.
Valentin Bartenev [Fri, 12 Dec 2014 17:25:28 +0000 (20:25 +0300)]
Autoindex: rendering code moved to a separate function.

No functional changes.

11 years agoHeaders filter: variables support in expires (ticket #113).
Maxim Dounin [Thu, 11 Dec 2014 20:42:11 +0000 (23:42 +0300)]
Headers filter: variables support in expires (ticket #113).

11 years agoHeaders filter: local variables for config, no functional changes.
Maxim Dounin [Thu, 11 Dec 2014 20:42:06 +0000 (23:42 +0300)]
Headers filter: local variables for config, no functional changes.

11 years agoUpstream: fixed inheritance of proxy_store and friends.
Valentin Bartenev [Thu, 9 Oct 2014 16:30:11 +0000 (20:30 +0400)]
Upstream: fixed inheritance of proxy_store and friends.

The proxy_store, fastcgi_store, scgi_store and uwsgi_store were inherited
incorrectly if a directive with variables was defined, and then redefined
to the "on" value, i.e. in configurations like:

    proxy_store /data/www$upstream_http_x_store;

    location / {
        proxy_store on;
    }

11 years agoProxy: fixed incorrect URI change due to if (ticket #86).
Maxim Dounin [Tue, 9 Dec 2014 15:22:39 +0000 (18:22 +0300)]
Proxy: fixed incorrect URI change due to if (ticket #86).

In the following configuration request was sent to a backend without
URI changed to '/' due to if:

    location /proxy-pass-uri {
        proxy_pass http://127.0.0.1:8080/;

        set $true 1;

        if ($true) {
            # nothing
        }
    }

Fix is to inherit conf->location from the location where proxy_pass was
configured, much like it's done with conf->vars.

11 years agoUpstream: fixed unexpected inheritance into limit_except blocks.
Maxim Dounin [Tue, 9 Dec 2014 15:22:31 +0000 (18:22 +0300)]
Upstream: fixed unexpected inheritance into limit_except blocks.

The proxy_pass directive and other handlers are not expected to be inherited
into nested locations, but there is a special code to inherit upstream
handlers into limit_except blocks, as well as a configuration into if{}
blocks.  This caused incorrect behaviour in configurations with nested
locations and limit_except blocks, like this:

    location / {
        proxy_pass http://u;

        location /inner/ {
            # no proxy_pass here

            limit_except GET {
                # nothing
            }
        }
    }

In such a configuration the limit_except block inside "location /inner/"
unexpectedly used proxy_pass defined in "location /", while it shouldn't.
Fix is to avoid inheritance of conf->upstream.upstream (and
conf->proxy_lengths) into locations which don't have noname flag.

11 years agoUpstream: inheritance of proxy_pass and friends (ticket #645).
Maxim Dounin [Tue, 9 Dec 2014 15:21:55 +0000 (18:21 +0300)]
Upstream: inheritance of proxy_pass and friends (ticket #645).

Instead of independant inheritance of conf->upstream.upstream (proxy_pass
without variables) and conf->proxy_lengths (proxy_pass with variables)
we now test them both and inherit only if neither is set.  Additionally,
SSL context is also inherited only in this case now.

Based on the patch by Alexey Radkov.

11 years agoProxy: the "TE" header now stripped by default (ticket #537).
Maxim Dounin [Tue, 9 Dec 2014 15:20:19 +0000 (18:20 +0300)]
Proxy: the "TE" header now stripped by default (ticket #537).

11 years agoCache: send conditional requests only for cached 200/206 responses.
Piotr Sikora [Thu, 27 Nov 2014 02:35:37 +0000 (18:35 -0800)]
Cache: send conditional requests only for cached 200/206 responses.

RFC7232 says:

   The 304 (Not Modified) status code indicates that a conditional GET
   or HEAD request has been received and would have resulted in a 200
   (OK) response if it were not for the fact that the condition
   evaluated to false.

which means that there is no reason to send requests with "If-None-Match"
and/or "If-Modified-Since" headers for responses cached with other status
codes.

Also, sending conditional requests for responses cached with other status
codes could result in a strange behavior, e.g. upstream server returning
304 Not Modified for cached 404 Not Found responses, etc.

Signed-off-by: Piotr Sikora <piotr@cloudflare.com>
11 years agoSSL: loading certificate keys via ENGINE_load_private_key().
Dmitrii Pichulin [Mon, 4 Aug 2014 07:03:20 +0000 (11:03 +0400)]
SSL: loading certificate keys via ENGINE_load_private_key().

11 years agoVersion bump.
Maxim Dounin [Thu, 4 Dec 2014 13:37:31 +0000 (16:37 +0300)]
Version bump.

11 years agorelease-1.7.8 tag
Maxim Dounin [Tue, 2 Dec 2014 13:02:14 +0000 (16:02 +0300)]
release-1.7.8 tag

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.