summaryrefslogtreecommitdiffhomepage
path: root/src (follow)
AgeCommit message (Collapse)AuthorFilesLines
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-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-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.
2016-09-22Upstream: introduced u->upstream.Maxim Dounin4-0/+6
It holds upstream{} block configuration, including ones selected via run-time lookup using variables.
2016-09-22Upstream: style.Maxim Dounin6-6/+0
2016-07-25Upstream: style, ngx_http_upstream_rr_peer_t.next moved.Maxim Dounin2-4/+4
2016-09-20Perl: pass additional linker options to perl module.Konstantin Pavlov1-0/+2
Previously flags passed by --with-ld-opt were not used when building perl module, which meant hardening flags provided by package build systems were not applied.
2016-09-20Fixed log levels of configuration parsing errors.Valentin Bartenev5-10/+10
All the errors that prevent loading configuration must be printed on the "emerg" log level. Previously, nginx might silently fail to load configuration in some cases as the default log level is "error".
2016-09-20Removed influence of some options on structures.Ruslan Ermilov3-8/+1
2016-09-16Upstream hash: fixed missing upstream name initialization.Vladimir Homutov2-0/+2
2016-09-15Stream ssl_preread: removed internal macro.Vladimir Homutov1-6/+6
The ngx_log_debug() macro is internal and should not be used.
2016-09-15Stream: ssl_preread module.Vladimir Homutov1-0/+448
The ssl_preread module extracts information from the SSL Client Hello message without terminating SSL. Currently, only $ssl_preread_server_name variable is supported, which contains server name from the SNI extension.
2016-09-15Stream: preread phase.Vladimir Homutov3-1/+145
In this phase, head of a stream is read and analysed before proceeding to the content phase. Amount of data read is controlled by the module implementing the phase, but not more than defined by the "preread_buffer_size" directive. The time spent on processing preread is controlled by the "preread_timeout" directive. The typical preread phase module will parse the beginning of a stream and set variable that may be used by the content phase, for example to make routing decision.
2016-09-15Stream: phases.Roman Arutyunyan9-183/+425
2016-09-15Stream: filters.Roman Arutyunyan20-100/+733
2016-09-15Version bump.Vladimir Homutov1-2/+2
2016-09-12OCSP stapling: fixed using wrong responder with multiple certs.Maxim Dounin1-0/+3
2016-09-12SSL: improved session ticket callback error handling.Sergey Kandaurov1-3/+32
Prodded by Guido Vranken.
2016-09-12SSL: factored out digest and cipher in session ticket callback.Sergey Kandaurov1-14/+14
No functional changes.
2016-09-08Stream: increase default value for proxy_protocol_timeout to 30s.Dmitry Volyntsev1-1/+1
2016-09-01Stream: realip module.Dmitry Volyntsev3-0/+352
2016-09-07Core: introduced ngx_cidr_match() function.Dmitry Volyntsev3-98/+112
2016-09-06Stream: allow using the session context inside handlers.Dmitry Volyntsev1-21/+16
Previously, it was not possible to use the stream context inside ngx_stream_init_connection() handlers. Now, limit_conn, access handlers, as well as those added later, can create their own contexts.
2016-09-06Stream: $proxy_protocol_addr and $proxy_protocol_port.Dmitry Volyntsev1-0/+50
2016-09-06Stream: the "proxy_protocol" parameter of the "listen" directive.Dmitry Volyntsev4-1/+122
2016-09-06Stream: postpone session initialization under accept mutex.Dmitry Volyntsev2-3/+42
Previously, it was possible that some system calls could be invoked while holding the accept mutex. This is clearly wrong as it prevents incoming connections from being accepted as quickly as possible.
2016-09-05Stream: log module.Vladimir Homutov5-0/+1554
2016-09-02Stream: upstream response time variables.Vladimir Homutov3-0/+103
The $upstream_connect_time, $upstream_first_byte_time and $upstream_session_time variables keep corresponding times.
2016-09-02Stream: $upstream_bytes_sent and $upstream_bytes_received.Vladimir Homutov3-2/+78
2016-09-02Stream: the $upstream_addr variable.Vladimir Homutov4-2/+116
Keeps the full address of the upstream server. If several servers were contacted during proxying, their addresses are separated by commas, e.g. "192.168.1.1:80, 192.168.1.2:80".
2016-08-11Stream: the $status variable.Roman Arutyunyan5-57/+112
The stream session status is one of the following: 200 - normal completion 403 - access forbidden 500 - internal server error 502 - bad gateway 503 - limit conn
2016-09-01Event pipe: do not set file's thread_handler if not needed.Maxim Dounin1-4/+6
This fixes a problem with aio threads and sendfile with aio_write switched off, as observed with range requests after fc72784b1f52 (1.9.13). Potential problems with sendfile in threads were previously described in 9fd738b85fad, and this seems to be one of them. The problem occurred as file's thread_handler was set to NULL by event pipe code after a sendfile thread task was scheduled. As a result, no sendfile completion code was executed, and the same buffer was additionally sent using non-threaded sendfile. Fix is to avoid modifying file's thread_handler if aio_write is switched off. Note that with "aio_write on" it is still possible that sendfile will use thread_handler as set by event pipe. This is believed to be safe though, as handlers used are compatible.