summaryrefslogtreecommitdiffhomepage
AgeCommit message (Collapse)AuthorFilesLines
2012-11-13nginx-1.2.5-RELEASErelease-1.2.5Maxim Dounin1-0/+69
2012-11-13Merge of r4896: event pipe: fixed handling of buf_to_file data.Maxim Dounin2-2/+10
Input filter might free a buffer if there is no data in it, and in case of first buffer (used for cache header and request header, aka p->buf_to_file) this resulted in cache corruption. Buffer memory was reused to read upstream response before headers were written to disk. Fix is to avoid moving pointers in ngx_event_pipe_add_free_buf() to a buffer start if we were asked to free a buffer used by p->buf_to_file. This fixes occasional cache file corruption, usually resulted in "cache file ... has md5 collision" alerts. Reported by Anatoli Marinov.
2012-11-13Merge of r4892: keepalive memory usage optimization.Maxim Dounin1-0/+14
The ngx_http_keepalive_handler() function is now trying to not keep c->buffer's memory for idle connections. This behaviour is consistent with the ngx_http_set_keepalive() function and it should decrease memory usage in some cases (especially if epoll/rtsig is used).
2012-11-13Merge of r4891: worker_processes auto.Maxim Dounin1-2/+33
Core: the "auto" parameter of the "worker_processes" directive. The parameter will set the number of worker processes to the autodetected number of available CPU cores.
2012-11-13Merge of r4886, r4887, r4894: log variables generalization:Maxim Dounin2-31/+79
*) Log: $apache_bytes_sent removed. It was renamed to $body_bytes_sent in nginx 0.3.10 and the old name is deprecated since then. *) Variable $bytes_sent. It replicates variable $bytes_sent as previously available in log module only. Patch by Benjamin Grössing (with minor changes). *) Variables $connection and $connection_requests. Log module counterparts are removed as they aren't used often and there is no need to preserve them for efficiency.
2012-11-13Merge of r4885: ssl_verify_client optional_no_ca.Maxim Dounin3-2/+12
SSL: the "ssl_verify_client" directive parameter "optional_no_ca". This parameter allows to don't require certificate to be signed by a trusted CA, e.g. if CA certificate isn't known in advance, like in WebID protocol. Note that it doesn't add any security unless the certificate is actually checked to be trusted by some external means (e.g. by a backend). Patch by Mike Kazantsev, Eric O'Connor.
2012-11-12Merge of r4872, r4893: resolver cached addresses random rotation.Maxim Dounin1-2/+29
Resolver: cached addresses are returned with random rotation now. This ensures balancing when working with dynamically resolved upstream servers with multiple addresses. Based on patch by Anton Jouline.
2012-11-12Merge of r4870, r4871, r4890, r4895: minor fixes.Maxim Dounin9-37/+35
*) Made sure to initialize the entire ngx_file_t structure. Found by Coverity. *) Correct plural form for "path" in the whole source base. *) Removed conditional compilation from waitpid() error test. There are reports that call to a signal handler for an exited process despite waitpid() already called for the process may happen on Linux as well. *) Style, parentheses instead of braces in misc/GNUMakefile.
2012-11-12Merge of r4868, r4869: SSL minor fixes.Maxim Dounin1-3/+5
*) SSL: fixed compression workaround to remove all methods. Previous code used sk_SSL_COMP_delete(ssl_comp_methods, i) while iterating stack from 0 to n, resulting in removal of only even compression methods. In real life this change is a nop, as there is only one compression method which is enabled by default in OpenSSL. *) SSL: added version checks for ssl compression workaround. The SSL_COMP_get_compression_methods() is only available as an API function in OpenSSL 0.9.8+, require it explicitly to unbreak build with OpenSSL 0.9.7.
2012-11-12Merge of r4866, r4867: configure fixes.Maxim Dounin2-1/+13
*) Configure: help updated to list upstream keepalive and least_conn. Patch by Joshua Zhu. *) Configure: additional test for ExtUtils::Embed perl module presence. Now perl configure will correctly fail if ExtUtils::Embed perl module is not present in the system (found on Amazon Linux AMI, as of release 2012.03).
2012-11-12Merge of r4865: clearing of cpu_affinity after process spawn.Maxim Dounin1-0/+2
This fixes unwanted/incorrect cpu_affinity use on dead worker processes respawn. While this is not ideal, it's expected to be better when previous situation where multiple processes were spawn with identical CPU affinity set. Reported by Charles Chen.
2012-11-12Version bump.Maxim Dounin2-3/+3
2012-09-25release-1.2.4 tagMaxim Dounin1-0/+1
2012-09-25nginx-1.2.4-RELEASErelease-1.2.4Maxim Dounin1-0/+95
2012-09-25Stable: removed gunzip module from win32 helper target.Maxim Dounin1-1/+0
Gunzip filter isn't merged into stable branch.
2012-09-24Merge of r4835, r4841: improved welcome and 50x error pages.Maxim Dounin2-13/+33
2012-09-24Merge of r4833: limit req: fix of rbtree node insertion.Maxim Dounin1-4/+4
Limit req: fix of rbtree node insertion on hash collisions. The rbtree used in ngx_http_limit_req_module has two level of keys, the top is hash, and the next is the value string itself. However, when inserting a new node, only hash has been set, while the value string has been left empty. The bug was introduced in r4419 (1.1.14). Found by Charles Chen.
2012-09-24Merge of r4829: fixed strict aliasing with ipv6 (ticket #201).Maxim Dounin3-3/+29
Fixed strict aliasing bugs when dealing with IPv4-mapped IPv6 addresses.
2012-09-24Merge of r4828: "include" with wildcards in map and types blocks.Maxim Dounin4-21/+6
The "include" directive should be able to include multiple files if given a filename mask. Fixed this to work for "include" directives inside the "map" or "types" blocks. The "include" directive inside the "geo" block is still not fixed.
2012-09-24Merge of r4817: geo: fixed handling of ranges without default set.Maxim Dounin1-4/+4
The bug had appeared in 0.8.43 (r3653). Patch by Weibin Yao.
2012-09-24Merge of r4815: map: fixed optimization of variables as values.Maxim Dounin1-8/+2
Previous code incorrectly used ctx->var_values as an array of pointers to ngx_http_variable_value_t, but the array contains structures, not pointers. Additionally, ctx->var_values inspection failed to properly set var on match.
2012-09-24Merge of r4813, r4814, r4818, r4819, r4820, r4823: mail fixes.Maxim Dounin4-15/+34
*) Corrected the directive name in the ngx_mail_auth_http_module error message. *) Don't let the well-known port in the "listen" directive to override the already set "protocol". *) Fixed sorting of listen addresses (ticket #187). For http module this problem was already fixed in r4756. *) Removed a stale "AF_INET only" comment. IPv6 client connections in mail modules have been supported since r2856. *) Fixed handling of AF_UNIX addresses in "listen". This makes AF_UNIX addresses in mail officially supported. *) Whitespace fix.
2012-09-24Merge of r4785, r4795, r4811, r4812, r4816, r4822: coverity.Maxim Dounin8-13/+31
*) Resolver: fixed possible memory leak in ngx_resolver_create(). *) Explicitly ignore returned value from unlink() in ngx_open_tempfile(). *) Explicitly ignore returned value from close() in ngx_event_core_init_conf(). *) Added three missing checks for NULL after ngx_array_push() calls. *) Crypt: fixed handling of corrupted SSHA entries in password file. *) Mark logically dead code with corresponding comment. Found by / prodded by Coverity.
2012-09-24Merge of r4784: fixed the -p parameter handling.Maxim Dounin1-1/+1
Ensure that the path supplied always ends with a `/' except when empty. An empty value now corresponds to the current directory instead of `/'.
2012-09-24Merge of r4842: fixed make macros to use parentheses.Maxim Dounin3-3/+3
Configure: fixed make macros to use parentheses instead of braces. Parentheses are more portable, in particular they are understood by nmake while braces aren't.
2012-09-24Merge of r4779, r4840, r4843, r4844: win32 changes.Maxim Dounin5-8/+51
*) Fixed build with Visual Studio 2005 Express. It is available via winetricks which makes it still usable, and has an old crtdefs.h which uses _CRT_SECURE_NO_DEPRECATE instead of _CRT_SECURE_NO_WARNINGS to suppress warnings. Reported by HAYASHI Kentaro, http://mailman.nginx.org/pipermail/nginx-devel/2012-August/002542.html *) Configure: provide inflate() when building zlib on win32. *) Helper target "win32" to run configure for win32 builds. *) Updated zlib used for win32 builds.
2012-09-24Merge of r4778, r4782, r4783, r4824, r4830, r4834: minor fixes.Maxim Dounin7-24/+24
*) Reorder checks in ngx_shared_memory_add() for more consistent error messages. *) Added "const" to ngx_memcpy() with NGX_MEMCPY_LIMIT defined. This fixes warning produced during compilation of the ngx_http_geoip_module due to const qualifier being discarded. *) Fixed possible use of old cached times if runtime went backwards. If ngx_time_sigsafe_update() updated only ngx_cached_err_log_time, and then clock was adjusted backwards, the cached_time[slot].sec might accidentally match current seconds on next ngx_time_update() call, resulting in various cached times not being updated. Fix is to clear the cached_time[slot].sec to explicitly mark cached times are stale and need updating. *) Radix tree preallocation fix. The preallocation size was calculated incorrectly and was always 8 due to sizeof(ngx_radix_tree_t) accidentally used instead of sizeof(ngx_radix_node_t). *) Fixed overflow if ngx_slab_alloc() is called with very big "size" argument. *) Write filter: replaced unneeded loop with one to free chains. Noted by Gabor Lekeny.
2012-09-24Merge of r4777, r4780, r4831, r4832: release process changes.Maxim Dounin5-66/+52
*) Simplified makefile that builds CHANGES. *) Removed the need in Perl to generate ZIP archive of nginx/Windows. *) Converted DOS-style newlines in dump.xslt. *) Pass changes.xml thru xmllint when generating CHANGES and CHANGES.ru.
2012-09-24Version bump.Maxim Dounin2-3/+3
2012-08-07release-1.2.3 tagMaxim Dounin1-0/+1
2012-08-07nginx-1.2.3-RELEASErelease-1.2.3Maxim Dounin1-0/+76
2012-08-06Merge of r4739: s/ngx_shmtx_destory/ngx_shmtx_destroy/.Maxim Dounin2-4/+4
2012-08-06Merge of r4775: updated PCRE used for win32 builds.Maxim Dounin1-1/+1
2012-08-06Merge of r4771: ngx_http_find_virtual_server() fix.Maxim Dounin1-1/+1
The ngx_http_find_virtual_server() function should return NGX_DECLINED if virtual server not found.
2012-08-06Merge of r4770: hide_headers/pass_headers inheritance fix.Maxim Dounin1-3/+3
Hide headers and pass headers arrays might not be inherited correctly into a nested location, e.g. in configuration like server { proxy_hide_header X-Foo; location / { location /nested/ { proxy_pass_header X-Pad; } } } the X-Foo header wasn't hidden in the location /nested/. Reported by Konstantin Svist, http://mailman.nginx.org/pipermail/nginx-ru/2012-July/047555.html
2012-08-06Merge of r4769: better diagnostics for directives in wrong context.Maxim Dounin3-23/+16
2012-08-06Merge of r4766, r4767: ngx_http_upstream_add() changes.Maxim Dounin1-3/+3
*) Fixed to return NULL if an error occurs. *) Microoptimization: replaced an expression known to be constant with the constant value.
2012-08-06Merge of r4765: reduced the number of preprocessor directives.Maxim Dounin1-5/+1
2012-08-06Merge of r4764: debug_connection with a domain name change.Maxim Dounin1-25/+66
When "debug_connection" is configured with a domain name, only the first resolved address was used. Now all addresses will be used.
2012-08-06Merge of r4763: added the Clang compiler support.Maxim Dounin3-0/+108
The -Werror is commented out to not break builds on Linux.
2012-08-06Merge of r4760, r4761: -Wmissing-prototypes.Maxim Dounin15-8/+76
Fixed compilation with -Wmissing-prototypes. Added a commented out -Wmissing-prototypes to CFLAGS. It is commented out to not break builds with 3rd party modules.
2012-08-06Merge of r4759, r4762, r4768: configure minor fixes.Maxim Dounin3-29/+13
*) Replaced a number of "else if" with "elif". *) Made sure to run configure in a "C" locale. Otherwise, we may fail to properly detect a version of compiler. *) Removed extraneous GCC warning flags.
2012-08-06Merge of r4758: win32: fixed cpu hog after process startup failure.Maxim Dounin1-0/+1
If ngx_spawn_process() failed while starting a process, the process handle was closed but left non-NULL in the ngx_processes[] array. The handle later was used in WaitForMultipleObjects() (if there were multiple worker processes configured and at least one worker process was started successfully), resulting in infinite loop. Reported by Ricardo Villalobos Guevara: http://mailman.nginx.org/pipermail/nginx-devel/2012-July/002494.html
2012-08-06Merge of r4757: debugging messages in limit_conn.Maxim Dounin1-2/+2
Fixed debugging messages to account that limit_zone was renamed to limit_conn.
2012-08-06Version bump.Maxim Dounin2-3/+3
2012-08-06Merge of r4756: fixed listen addresses sorting (ticket #187)Maxim Dounin1-0/+5
Fixed sorting of listen addresses so that wildcard address is always at the end. Failure to do so could result in several listen sockets to be created instead of only one listening on wildcard address. Reported by Roman Odaisky.
2012-08-06Merge of r4754: synchronized the license text.Maxim Dounin1-2/+3
Synchronized the license text with the FreeBSD's bsd-style-copyright.
2012-08-06Merge of r4741: fixed "make" used instead of "${MAKE}".Maxim Dounin3-3/+3
2012-08-06Merge of r4740: fixed $request_length for pipelined requests.Maxim Dounin1-7/+4
2012-08-06Merge of r4738: struct flock initialization.Maxim Dounin1-9/+3
Made sure to initialize the entire "struct flock" allocated on stack.