summaryrefslogtreecommitdiffhomepage
AgeCommit message (Collapse)AuthorFilesLines
2016-10-20HTTP/2: graceful shutdown of active connections (closes #1106).Valentin Bartenev2-9/+39
Previously, while shutting down gracefully, the HTTP/2 connections were closed in transition to idle state after all active streams have been processed. That might never happen if the client continued opening new streams. Now, nginx sends GOAWAY to all HTTP/2 connections and ignores further attempts to open new streams. A worker process will quit as soon as processing of already opened streams is finished.
2016-10-19SSL: compatibility with BoringSSL.Maxim Dounin2-2/+6
BoringSSL changed SSL_set_tlsext_host_name() to be a real function with a (const char *) argument, so it now triggers a warning due to conversion from (u_char *). Added an explicit cast to silence the warning. Prodded by Piotr Sikora, Alessandro Ghedini.
2016-10-18Core: show file contents only once while dumping configuration.Vladimir Homutov3-24/+66
Files are considered the same if the path used by nginx during parsing matches.
2016-10-18SSL: overcame possible buffer over-read in ngx_ssl_error().Valentin Bartenev1-1/+3
It appeared that ERR_error_string_n() cannot handle zero buffer size well enough and causes over-read. The problem has also been fixed in OpenSSL: https://git.openssl.org/?p=openssl.git;h=e5c1361580d8de79682958b04a5f0d262e680f8b
2016-10-08Mail: support SASL EXTERNAL (RFC 4422).Rob N ★10-15/+110
This is needed to allow TLS client certificate auth to work. With ssl_verify_client configured, the auth daemon can choose to allow the connection to proceed based on the certificate data. This has been tested with Thunderbird for IMAP only. I've not yet found a client that will do client certificate auth for POP3 or SMTP, and the method is not really documented anywhere that I can find. That said, its simple enough that the way I've done is probably right.
2016-10-18Mail: extensible auth methods in pop3 module.Maxim Dounin1-28/+66
2016-10-14Upstream: handling of proxy_set_header at http level.Maxim Dounin4-0/+56
When headers are set at the "http" level and not redefined in a server block, we now preserve conf->headers into the "http" section configuration to inherit it to all servers. The same applies to conf->headers_cache, though it may not be effective if no servers use cache at the "server" level as conf->headers_cache is only initialized if cache is enabled on a given level. Similar changes made in fastcgi/scgi/uwsgi to preserve conf->params and conf->params_cache.
2016-10-14Proxy: do not create conf->headers_source when not needed.Maxim Dounin1-15/+10
2016-10-14Upstream: hide_headers_hash handling at http level.Maxim Dounin1-1/+17
When headers to hide are set at the "http" level and not redefined in a server block, we now preserve compiled headers hash into the "http" section configuration to inherit this hash to all servers.
2016-10-14Upstream: hide_headers_hash inherited regardless of cache settings.Maxim Dounin1-6/+1
Dependency on cache settings existed prior to 2728c4e4a9ae (0.8.44) as Set-Cookie header was automatically hidden from responses when using cache. This is no longer the case, and hide_headers_hash can be safely inherited regardless of cache settings.
2016-10-14Style.Maxim Dounin1-1/+0
2016-10-13Cache: cache manager debugging.Ruslan Ermilov1-9/+23
2016-10-13Version bump.Ruslan Ermilov1-2/+2
2016-10-11release-1.11.5 tagMaxim Dounin1-0/+1
2016-10-11nginx-1.11.5-RELEASErelease-1.11.5Maxim Dounin1-0/+134
2016-10-11Updated OpenSSL used for win32 builds.Maxim Dounin1-1/+1
2016-10-10Modules compatibility: removed dependencies on NGX_MAIL_SSL.Maxim Dounin1-4/+0
External structures are now identical regardless of mail SSL module compiled in or not.
2016-10-10Modules compatibility: removed dependencies on NGX_STREAM_SSL.Maxim Dounin4-14/+0
External structures are now identical regardless of stream SSL module compiled in or not.
2016-10-10Modules compatibility: compatibility with NGX_HTTP_SSL.Maxim Dounin9-33/+26
With this change it is now possible to load modules compiled without the "--with-http_ssl_module" configure option into nginx binary compiled with it, and vice versa (if a module doesn't use ssl-specific functions), assuming both use the "--with-compat" option.
2016-10-10Modules compatibility: compatibility with NGX_HAVE_FILE_AIO.Maxim Dounin6-11/+7
With this change it is now possible to load modules compiled without the "--with-file-aio" configure option into nginx binary compiled with it, and vice versa, assuming both use the "--with-compat" option.
2016-10-10Modules compatibility: compatibility with NGX_THREADS.Maxim Dounin8-24/+21
With this change it is now possible to load modules compiled without the "--with-threads" configure option into nginx binary compiled with it, and vice versa (if a module does not use thread-specific functions), assuming both use the "--with-compat" option.
2016-10-10Allowed '-' in method names.Maxim Dounin2-3/+3
It is used at least by SOAP (M-POST method, defined by RFC 2774) and by WebDAV versioning (VERSION-CONTROL and BASELINE-CONTROL methods, defined by RFC 3253).
2016-10-10Core: sockaddr lengths now respected by ngx_cmp_sockaddr().Maxim Dounin1-6/+13
Linux can return AF_UNIX sockaddrs with partially filled sun_path, resulting in spurious comparison failures and failed binary upgrades. Added proper checking of the lengths provided. Reported by Jan Seda, http://mailman.nginx.org/pipermail/nginx-devel/2016-September/008832.html.
2016-10-07Core: ngx_conf_set_access_slot() user access (ticket #1096).Maxim Dounin1-2/+6
Previously, user access bits were always set to "rw" unconditionally, even with "user:r" explicitly specified. With this change we only add default user access bits (0600) if they weren't set explicitly.
2016-10-06Realip: fixed duplicate processing on redirects (ticket #1098).Maxim Dounin1-4/+4
Duplicate processing was possible if the address set by realip was listed in set_realip_from, and there was an internal redirect so module context was cleared. This resulted in exactly the same address being set, so this wasn't a problem before the $realip_remote_addr variable was introduced, though now results in incorrect $realip_remote_addr being picked. Fix is to use ngx_http_realip_get_module_ctx() to look up module context even if it was cleared. Additionally, the order of checks was switched to check the configuration first as it looks more effective.
2016-10-05Stream ssl_preread: fixed $ssl_preread_server_name variable.Sergey Kandaurov1-1/+2
Made sure to set the variable length only after successful SNI parsing.
2016-10-05Cache: cache manager limits.Dmitry Volyntsev5-16/+105
The new parameters "manager_files", "manager_sleep" and "manager_threshold" were added to proxy_cache_path and friends. Note that ngx_path_manager_pt was changed to return ngx_msec_t instead of time_t (API change).
2016-10-05Core: use c->log while closing connection.Ruslan Ermilov1-4/+1
c->pool is not destroyed here since c52408583801.
2016-10-04SSL: use X509_check_host() with LibreSSL.Maxim Dounin1-3/+3
Explicit checks for OPENSSL_VERSION_NUMBER replaced with checks for X509_CHECK_FLAG_ALWAYS_CHECK_SUBJECT, thus allowing X509_check_host() to be used with other libraries. In particular, X509_check_host() was introduced in LibreSSL 2.5.0.
2016-10-04Configure: removed the --with-ipv6 option.Maxim Dounin5-33/+28
IPv6 now compiled-in automatically if support is found. If there is a need to disable it for some reason, --with-cc-opt="-DNGX_HAVE_INET6=0" can be used for this.
2016-10-03Addition filter: set last_in_chain flag when clearing last_buf.Roman Arutyunyan1-0/+1
When the last_buf flag is cleared for add_after_body to append more data from a subrequest, other filters may still have buffered data, which should be flushed at this point. For example, the sub_filter may have a partial match buffered, which will only be flushed after the subrequest is done, ending up with interleaved data in output. Setting last_in_chain instead of last_buf flushes the data and fixes the order of output buffers.
2016-10-03Do not set last_buf flag in subrequests.Roman Arutyunyan3-3/+4
The last_buf flag should only be set in the last buffer of the main request. Otherwise, several last_buf flags can appear in output. This can, for example, break the chunked filter, which will include several final chunks in output.
2016-10-03Modules compatibility: removed two NGX_HAVE_DEFERRED_ACCEPT checks.Ruslan Ermilov3-10/+2
Removed (NGX_HAVE_DEFERRED_ACCEPT && defined TCP_DEFER_ACCEPT) from the signature accordingly.
2016-10-03Modules compatibility: removed unneeded NGX_HAVE_REUSEPORT checks.Maxim Dounin4-11/+0
Removed NGX_HAVE_REUSEPORT from the signature accordingly.
2016-10-03Modules compatibility: removed unneeded IPV6_V6ONLY checks.Maxim Dounin11-14/+10
The IPV6_V6ONLY macro is now checked only while parsing appropriate flag and when using the macro. The ipv6only field in listen structures is always initialized to 1, even if not supported on a given platform. This is expected to prevent a module compiled without IPV6_V6ONLY from accidentally creating dual sockets if loaded into main binary with proper IPV6_V6ONLY support.
2016-10-03Modules compatibility: http2.Maxim Dounin4-15/+0
HTTP/2-specific fields in structures are now available unconditionally. Removed NGX_HTTP_V2 from the signature accordingly.
2016-10-03Modules compatibility: degradation fields now always present.Maxim Dounin2-6/+0
There is no need to save these two bits as they are wasted anyway. Removed NGX_HTTP_DEGRADATION from the signature accordingly.
2016-10-03Modules compatibility: --with-compat configure option.Maxim Dounin2-0/+18
2016-09-29Introduced the NGX_COMPAT macro.Ruslan Ermilov7-1/+41
When enabled, some structures are padded to be size compatible with their NGINX Plus versions.
2016-09-29Resolver: introduced state field in ngx_resolver_srv_name_t.Dmitry Volyntsev2-0/+2
It keeps the actual state value of a DNS SRV subrequest and can be used to report a more detailed log for failed SRV records.
2016-09-29Modules compatibility: down flag promoted to a bitmask.Maxim Dounin2-2/+2
It is to be used as a bitmask with various bits set/reset when appropriate. Any bit set means that the peer should not be used, that is, exactly what current checks do, no additional changes required.
2016-09-29Modules compatibility: upstream config field.Maxim Dounin4-0/+6
It is to be used to track version of an upstream configuration used for request processing.
2016-09-29Modules compatibility: status fields.Maxim Dounin2-0/+3
2016-09-29Modules compatibility: health check fields.Maxim Dounin2-1/+5
2016-09-29Modules compatibility: cache purge fields.Maxim Dounin3-1/+7
2016-09-29Modules compatibility: slow start fields.Maxim Dounin4-0/+6
2016-09-29Modules compatibility: peer.notify.Maxim Dounin1-0/+3
This callback can be used to notify balancer about various events. For now, it is only used in nginx-plus.
2016-09-29Stream: style.Ruslan Ermilov1-0/+2
Explicitly initialized peer's max_conns for upstreams created with variables similar to how it's done in http.
2016-09-22Upstream: max_conns.Ruslan Ermilov13-2/+109
2016-09-22Upstream: removed the quick recovery mechanism.Ruslan Ermilov4-24/+0
Its usefulness it questionable, and it interacts badly with max_conns.