aboutsummaryrefslogtreecommitdiff
path: root/src
Commit message (Collapse)AuthorAge
* Thread pools: keep waiting tasks mutex in ngx_thread_pool_t.Valentin Bartenev2015-03-23
| | | | | | It's not needed for completed tasks queue since the previous change. No functional changes.
* Thread pools: replaced completed tasks queue mutex with spinlock.Valentin Bartenev2015-03-23
|
* Removed stub implementation of win32 mutexes.Ruslan Ermilov2015-03-23
|
* SSL: use of SSL_MODE_NO_AUTO_CHAIN.Maxim Dounin2015-03-23
| | | | | | | | | The SSL_MODE_NO_AUTO_CHAIN mode prevents OpenSSL from automatically building a certificate chain on the fly if there is no certificate chain explicitly provided. Before this change, certificates provided via the ssl_client_certificate and ssl_trusted_certificate directives were used by OpenSSL to automatically build certificate chains, resulting in unexpected (and in some cases unneeded) chains being sent to clients.
* SSL: avoid SSL_CTX_set_tmp_rsa_callback() call with LibreSSL.Maxim Dounin2015-03-23
| | | | | | | | LibreSSL removed support for export ciphers and a call to SSL_CTX_set_tmp_rsa_callback() results in an error left in the error queue. This caused alerts "ignoring stale global SSL error (...called a function you should not call) while SSL handshaking" on a first connection in each worker process.
* SSL: clear protocol options.Maxim Dounin2015-03-23
| | | | | | | | LibreSSL 2.1.1+ started to set SSL_OP_NO_SSLv3 option by default on new contexts. This makes sure to clear it to make it possible to use SSLv3 with LibreSSL if enabled in nginx config. Prodded by Kuramoto Eiji.
* Core: added cyclic memory buffer support for error_log.Valentin Bartenev2015-03-19
| | | | | | | | | | | | | | | | | | | | Example of usage: error_log memory:16m debug; This allows to configure debug logging with minimum impact on performance. It's especially useful when rare crashes are experienced under high load. The log can be extracted from a coredump using the following gdb script: set $log = ngx_cycle->log while $log->writer != ngx_log_memory_writer set $log = $log->next end set $buf = (ngx_log_memory_buf_t *) $log->wdata dump binary memory debug_log.txt $buf->start $buf->end
* Removed busy locks.Ruslan Ermilov2015-03-20
|
* Removed ngx_connection_t.lock.Ruslan Ermilov2015-03-20
|
* Removed unix ngx_threaded and related ngx_process_changes.Ruslan Ermilov2015-03-20
|
* Removed old pthread implementation.Ruslan Ermilov2015-03-20
|
* Removed old FreeBSD rfork() thread implementation.Ruslan Ermilov2015-03-20
|
* Thread pools: silence warning on process exit.Ruslan Ermilov2015-03-19
| | | | | Work around pthread_cond_destroy() and pthread_mutex_destroy() returning EBUSY. A proper solution would be to ensure all threads are terminated.
* Thread pools: fixed the waiting tasks accounting.Ruslan Ermilov2015-03-19
| | | | | Behave like POSIX semaphores. If N worker threads are waiting for tasks, at least that number of tasks should be allowed to be put into the queue.
* Thread pools: keep waiting tasks counter in ngx_thread_pool_t.Ruslan Ermilov2015-03-19
| | | | | | It's not needed for completed tasks queue. No functional changes.
* SPDY: fixed format specifier in logging.Xiaochen Wang2015-03-15
|
* Added support for offloading Linux sendfile() in thread pools.Valentin Bartenev2015-03-14
|
* Added support for offloading read() in thread pools.Valentin Bartenev2015-03-14
|
* Events: implemented eventport notification mechanism.Ruslan Ermilov2015-03-14
|
* Events: implemented kqueue notification mechanism.Valentin Bartenev2015-03-14
|
* Events: implemented epoll notification mechanism.Valentin Bartenev2015-03-14
|
* Thread pools implementation.Valentin Bartenev2015-03-14
|
* Renamed NGX_THREADS to NGX_OLD_THREADS because of deprecation.Ruslan Ermilov2015-03-04
| | | | It's mostly dead code and the original idea of worker threads has been rejected.
* Overflow detection in ngx_http_parse_chunked().Ruslan Ermilov2015-03-17
|
* Overflow detection in ngx_http_range_parse().Ruslan Ermilov2015-03-17
|
* Overflow detection in ngx_inet_addr().Ruslan Ermilov2015-03-17
|
* Core: overflow detection in ngx_parse_time() (ticket #732).Ruslan Ermilov2015-03-17
|
* Refactored ngx_parse_time().Ruslan Ermilov2015-03-17
| | | | No functional changes.
* Core: overflow detection in number parsing functions.Ruslan Ermilov2015-03-17
|
* Core: expose maximum values of time_t and ngx_int_t.Ruslan Ermilov2015-03-17
| | | | These are needed to detect overflows.
* The "aio" directive parser made smarter.Ruslan Ermilov2015-03-13
| | | | | | It now prints meaningful warnings on all platforms. No functional changes.
* Events: fixed typo in the error message.Ruslan Ermilov2015-03-12
|
* Deprecated "aio sendfile".Ruslan Ermilov2015-03-12
| | | | | Specifying "sendfile on" along with "aio on" activates the aio pre-loading mode for sendfile().
* Proxy: use an appropriate error on memory allocation failure.Ruslan Ermilov2015-03-04
|
* Style: moved ngx_http_ephemeral() macro to ngx_http_request.h.Ruslan Ermilov2015-03-04
|
* Style: use %*s format, as in 68d21fd1dc64.Ruslan Ermilov2015-03-04
|
* Log: use ngx_cpymem() in a couple of places, no functional changes.Valentin Bartenev2015-03-04
|
* Upstream keepalive: drop ready flag on EAGAIN from recv(MSG_PEEK).Valentin Bartenev2015-03-03
| | | | | | | | Keeping the ready flag in this case might results in missing notification of broken connection until nginx tried to use it again. While there, stale comment about stale event was removed since this function is also can be called directly.
* Events: simplified ngx_event_aio_t definition.Ruslan Ermilov2015-03-03
| | | | No functional changes.
* Refactored ngx_linux_sendfile_chain() even more.Valentin Bartenev2015-02-27
| | | | | | The code that calls sendfile() was cut into a separate function. This simplifies EINTR processing, yet is needed for the following changes that add threads support.
* Style.Maxim Dounin2015-03-03
| | | | Noted by Ruslan Ermilov.
* Upstream: upstream argument in ngx_http_upstream_process_request().Maxim Dounin2015-03-02
| | | | | | In case of filter finalization, r->upstream might be changed during the ngx_event_pipe() call. Added an argument to preserve it while calling the ngx_http_upstream_process_request() function.
* Upstream: avoid duplicate finalization.Maxim Dounin2015-03-02
| | | | | | | | | | | | | | | | A request may be already finalized when ngx_http_upstream_finalize_request() is called, due to filter finalization: after filter finalization upstream can be finalized via ngx_http_upstream_cleanup(), either from ngx_http_terminate_request(), or because a new request was initiated to an upstream. Then the upstream code will see an error returned from the filter chain and will call the ngx_http_upstream_finalize_request() function again. To prevent corruption of various upstream data in this situation, make sure to do nothing but merely call ngx_http_finalize_request(). Prodded by Yichun Zhang, for details see the thread at http://nginx.org/pipermail/nginx-devel/2015-February/006539.html.
* SSL: reset ready flag if recv(MSG_PEEK) found no bytes in socket.Roman Arutyunyan2015-03-02
| | | | | | | | | | | Previously, connection hung after calling ngx_http_ssl_handshake() with rev->ready set and no bytes in socket to read. It's possible in at least the following cases: - when processing a connection with expired TCP_DEFER_ACCEPT on Linux - after parsing PROXY protocol header if it arrived in a separate TCP packet Thanks to James Hamlin.
* Cache: do not inherit last_modified and etag from stale response.Roman Arutyunyan2015-03-02
| | | | | | | | | | | | | | | | When replacing a stale cache entry, its last_modified and etag could be inherited from the old entry if the response code is not 200 or 206. Moreover, etag could be inherited with any response code if it's missing in the new response. As a result, the cache entry is left with invalid last_modified or etag which could lead to broken revalidation. For example, when a file is deleted from backend, its last_modified is copied to the new 404 cache entry and is used later for revalidation. Once the old file appears again with its original timestamp, revalidation succeeds and the cached 404 response is sent to client instead of the file. The problem appeared with etags in 44b9ab7752e3 (1.7.3) and affected last_modified in 1573fc7875fa (1.7.9).
* Upstream hash: speedup consistent hash init.Roman Arutyunyan2015-03-02
| | | | | | | | | | | | | Repeatedly calling ngx_http_upstream_add_chash_point() to create the points array in sorted order, is O(n^2) to the total weight. This can cause nginx startup and reconfigure to be substantially delayed. For example, when total weight is 1000, startup takes 5s on a modern laptop. Replace this with a linear insertion followed by QuickSort and duplicates removal. Startup for total weight of 1000 reduces to 40ms. Based on a patch by Wai Keen Woon.
* Mail: don't emit Auth-SSL-Verify with disabled ssl_verify_client.Sergey Kandaurov2015-02-27
| | | | | Previously, the Auth-SSL-Verify header with the "NONE" value was always passed to the auth_http script if verification of client certificates is disabled.
* Mail: client SSL certificates support.Maxim Dounin2015-02-25
| | | | | | | | | | | | | | | | | | The "ssl_verify_client", "ssl_verify_depth", "ssl_client_certificate", "ssl_trusted_certificate", and "ssl_crl" directives introduced to control SSL client certificate verification in mail proxy module. If there is a certificate, detail of the certificate are passed to the auth_http script configured via Auth-SSL-Verify, Auth-SSL-Subject, Auth-SSL-Issuer, Auth-SSL-Serial, Auth-SSL-Fingerprint headers. If the auth_http_pass_client_cert directive is set, client certificate in PEM format will be passed in the Auth-SSL-Cert header (urlencoded). If there is no required certificate provided during an SSL handshake or certificate verification fails then a protocol-specific error is returned after the SSL handshake and the connection is closed. Based on previous work by Sven Peter, Franck Levionnois and Filipe Da Silva.
* Mail: added Auth-SSL header to indicate SSL.Maxim Dounin2015-02-25
| | | | Based on a patch by Filipe da Silva.
* Mail: fixed buffer allocation for CRLF after Auth-SMTP-* headers.Maxim Dounin2015-02-25
| | | | | There were no buffer overruns in real life as there is extra space allocated for the Auth-Login-Attempt counter.