aboutsummaryrefslogtreecommitdiff
path: root/src
Commit message (Collapse)AuthorAge
* Upstream: simplified some code that accesses peers.Ruslan Ermilov2014-06-12
| | | | No functional changes.
* Access log: fix default value, broken by cb308813b453.Piotr Sikora2014-06-03
| | | | | | | | | | | log->filter ("if" parameter) was uninitialized when the default value was being used, which would lead to a crash (SIGSEGV) when access_log directive wasn't specified in the configuration. Zero-fill the whole structure instead of zeroing fields one-by-one in order to prevent similar issues in the future. Signed-off-by: Piotr Sikora <piotr@cloudflare.com>
* Core: slab allocator free pages defragmentation.Maxim Dounin2014-06-03
| | | | | | | | | | Large allocations from a slab pool result in free page blocks being fragmented, eventually leading to a situation when no further allocation larger than a page size are possible from the pool. While this isn't a problem for nginx itself, it is known to be bad for various 3rd party modules. Fix is to merge adjacent blocks of free pages in the ngx_slab_free_pages() function. Prodded by Wandenberg Peixoto and Yichun Zhang.
* Upstream: generic hash module.Roman Arutyunyan2014-06-02
|
* SPDY: fixed operator precedence in uint16/uint32 write macros.Valentin Bartenev2014-05-29
| | | | | | | | | | Since the type cast has precedence higher than the bit shift operator, all values were truncated to 8 bits. These macros are used to construct header block for SYN_REPLY frame on platforms with strict alignment requirements. As a result, any response that contains a header with name or value longer than 255 bytes was corrupted on such platforms.
* Fixed config parsing of the last try_files parameter.Sergey Kandaurov2014-05-28
| | | | | | | | | | Do not taste the last parameter against directory, as otherwise it would result in the trailing slash being cut from the parameter value. Notably, this prevents an internal redirect to an empty URI if the parameter is set to the literal slash: location / { try_files $uri /; }
* Configure: added -Wno-deprecated-declarations on OS X.Maxim Dounin2014-05-28
| | | | | | | Previous workaround to avoid warnings on OS X due to deprecated system OpenSSL library (introduced in a3870ea96ccd) no longer works, as the MAC_OS_X_VERSION_MIN_REQUIRED macro is ignored on OS X 10.9 if a compiler used supports __attribute__(availability).
* Version bump.Maxim Dounin2014-05-28
|
* Sub filter: fixed subrequests handling.Maxim Dounin2014-05-27
| | | | | | | | In particular, properly output partial match at the end of a subrequest response (much like we do at the end of a response), and reset/set the last_in_chain flag as appropriate. Reported by KAWAHARA Masashi.
* Syslog: fixed message sending on win32.Vladimir Homutov2014-05-27
|
* Syslog: fixed possible resource leak and more verbose logging.Vladimir Homutov2014-05-26
| | | | Found by Coverity (CID 1215646).
* Events: use eventfd() instead of syscall(SYS_eventfd) if possible.Ruslan Ermilov2014-05-23
| | | | | | | | | This fixes --with-file-aio support on systems that lack eventfd() syscall, notably aarch64 Linux. The syscall(SYS_eventfd) may still be necessary on systems that have eventfd() syscall in the kernel but lack it in glibc, e.g. as seen in the current CentOS 5 release.
* Upstream: fix tries check in ip_hash.Roman Arutyunyan2014-05-23
| | | | | Make two checks for maximum number of tries consistent. The other one checks '>' condition.
* Mail: output client port number on client connects (ticket #531).Ruslan Ermilov2014-05-22
|
* Core: output client port number when logging accept event.Ruslan Ermilov2014-05-22
|
* Mail: added a check for the number of arguments in MAIL/RCPT.Maxim Dounin2014-05-21
| | | | | | | | Missed during introduction of the SMTP pipelining support (04e43d03e153, 1.5.6). Previously, the check wasn't needed as s->buffer was used directly and the number of arguments didn't matter. Reported by Svyatoslav Nikolsky.
* Added syslog support for error_log and access_log directives.Vladimir Homutov2014-05-12
|
* Configure: the --build= option.Ruslan Ermilov2014-05-20
| | | | If set, its value is output in "nginx -v" and in the error log.
* SSL: $ssl_client_fingerprint variable.Sergey Budnevitch2014-05-20
|
* Setting $args now invalidates unparsed uri.Maxim Dounin2014-05-19
| | | | Prodded by Yichun Zhang.
* Charset filter: fixed charset setting on encoded replies.Maxim Dounin2014-05-19
| | | | | | | | If response is gzipped we can't recode response, but in case it's not needed we still can add charset to Content-Type. The r->ignore_content_encoding is dropped accordingly, charset with gzip_static now properly works without any special flags.
* Fixed alias in regex locations with limit_except/if.Maxim Dounin2014-05-16
| | | | | | | | | | | The ngx_http_map_uri_to_path() function used clcf->regex to detect if it's working within a location given by a regular expression and have to replace full URI with alias (instead of a part matching the location prefix). This is incorrect due to clcf->regex being false in implicit locations created by if and limit_except. Fix is to preserve relevant information in clcf->alias instead, by setting it to NGX_MAX_SIZE_T_VALUE if an alias was specified in a regex location.
* SPDY: added protection from overrun of the receive buffer.Valentin Bartenev2014-04-30
|
* SPDY: added a debug point to the state buffer overflow protection.Valentin Bartenev2014-04-30
|
* SPDY: refactored ngx_http_spdy_state_headers().Valentin Bartenev2014-04-30
| | | | | This change is similar to d2ac5cf4056d. Special flag of completeness looks surplus when there is also a counter of frame bytes left.
* SPDY: improved logging.Valentin Bartenev2014-04-30
|
* SPDY: set log action for PROXY protocol only while parsing it.Valentin Bartenev2014-05-15
| | | | | | Handling of PROXY protocol for SPDY connection is currently implemented as a SPDY state. And while nginx waiting for PROXY protocol data it continues to process SPDY connection: initializes zlib context, sends control frames.
* SPDY: ngx_http_spdy_state_headers() error handling cleanup.Valentin Bartenev2014-04-30
| | | | | | | - Specification-friendly handling of invalid header block or special headers. Such errors are not fatal for session and shouldn't lead to connection close; - Avoid mix of NGX_HTTP_PARSE_INVALID_REQUEST/NGX_HTTP_PARSE_INVALID_HEADER.
* SPDY: improved error handling of header block decompression.Valentin Bartenev2014-04-30
| | | | | Now cases when decompression failed due to internal error and when a client sent corrupted data are distinguished.
* SPDY: removed ngx_http_spdy_state_headers_error().Valentin Bartenev2014-04-30
| | | | | | The function just calls ngx_http_spdy_state_headers_skip() most of the time. There was also an attempt of optimization to stop parsing if the client already closed connection, but it looks strange and unfinished anyway.
* SPDY: prevented creation of RST_STREAM in protocol error state.Valentin Bartenev2014-05-15
| | | | Previously, the frame wasn't sent anyway (and had a wrong status code).
* SPDY: improved ngx_http_spdy_state_protocol_error().Valentin Bartenev2014-04-30
| | | | | | | Now ngx_http_spdy_state_protocol_error() is able to close stream, so there is no need in a separate call for this. Also fixed zero status code in logs for some cases.
* SPDY: fixed one case of improper memory allocation error handling.Valentin Bartenev2014-04-30
| | | | | Now ngx_http_spdy_construct_request_line() doesn't try to finalize request in case of failed memory allocation.
* Style: use %N instead of '\n' where appropriate.Ruslan Ermilov2014-05-14
|
* Core: use '\r' for CR and '\n' for LF definitions.Ruslan Ermilov2014-05-14
|
* OCSP stapling: missing OCSP request free call.Filipe da Silva2014-04-29
|
* Upstream: restored workaround for "if".Maxim Dounin2014-04-30
| | | | | | | | The 7022564a9e0e changeset made ineffective workaround from 2464ccebdb52 to avoid NULL pointer dereference with "if". It is now restored by moving the u->ssl_name initialization after the check. Found by Coverity (CID 1210408).
* Core: improved ngx_conf_parse() error handling.Maxim Dounin2014-04-30
| | | | | | | | Previous code failed to properly restore cf->conf_file in case of ngx_close_file() errors, potentially resulting in double free of cf->conf_file->buffer->start. Found by Coverity (CID 1087507).
* Core: fixed error handling in ngx_reopen_files().Maxim Dounin2014-04-30
| | | | Found by Coverity (CID 1087509).
* Cache: added ngx_quit check to ngx_http_file_cache_expire().Maxim Dounin2014-04-30
| | | | | | | While managing big caches it is possible that expiring old cache items in ngx_http_file_cache_expire() will take a while. Added a check for ngx_quit / ngx_terminate to make sure cache manager can be terminated while in ngx_http_file_cache_expire().
* Upstream: added the "$upstream_cookie_<name>" variables.Vladimir Homutov2014-04-29
|
* Proxy: fixed possible uninitialized memory access.Valentin Bartenev2013-11-18
| | | | | | | | | | | | | The ngx_http_proxy_rewrite_cookie() function expects the value of the "Set-Cookie" header to be null-terminated, and for headers obtained from proxied server it is usually true. Now the ngx_http_proxy_rewrite() function preserves the null character while rewriting headers. This fixes accessing memory outside of rewritten value if both the "proxy_cookie_path" and "proxy_cookie_domain" directives are used in the same location.
* Version bump.Valentin Bartenev2014-04-24
|
* SSL: explicit handling of empty names.Maxim Dounin2014-04-23
| | | | | X509_check_host() can't handle non null-terminated names with zero length, so make sure to fail before calling it.
* Upstream: for ssl name, non-aligned memory allocation is enough.Ruslan Ermilov2014-04-22
|
* SSL: added explicit check for ngx_strlchr() result.Maxim Dounin2014-04-22
|
* SPDY: avoid sending RST_STREAM on WINDOW_UPDATE with unknown SID.Valentin Bartenev2014-04-21
| | | | | | | There's a race condition between closing a stream by one endpoint and sending a WINDOW_UPDATE frame by another. So it would be better to just skip such frames for unknown streams, like is already done for the DATA frames.
* SPDY: Stream-ID restrictions according to specification.Valentin Bartenev2014-04-21
|
* Upstream: uwsgi_ssl_name, uwsgi_ssl_verify, and so on.Maxim Dounin2014-04-18
| | | | | Just a merge of proxy_ssl_name, proxy_ssl_verify commits into uwsgi module, code is identical.
* Upstream: proxy_ssl_verify and friends.Maxim Dounin2014-04-18
|