summaryrefslogtreecommitdiffhomepage
AgeCommit message (Collapse)AuthorFilesLines
2013-07-13Events: honor NGX_USE_GREEDY_EVENT when kqueue support is enabled.Valentin Bartenev2-2/+4
Currently this flag is needed for epoll and rtsig, and though these methods usually present on different platforms than kqueue, nginx can be compiled to support all of them.
2013-07-11Style.Maxim Dounin3-3/+3
2013-07-11Configure: perl Makefile rebuild after configure.Maxim Dounin1-0/+1
The $NGX_AUTO_CONFIG_H added to perl module Makefile dependencies to make sure it's always rebuild after a configure. It is needed as we expand various variables used for Makefile generation during configure (in particular, nginx version).
2013-07-11Core: fixed possible use of an uninitialized variable.Vladimir Homutov1-0/+2
The call to ngx_sock_ntop() in ngx_connection_local_sockaddr() might be performed with the uninitialized "len" variable. The fix is to initialize variable to the size of corresponding socket address type. The issue was introduced in commit 05ba5bce31e0.
2013-07-11Core: extended ngx_sock_ntop() with socklen parameter.Vladimir Homutov10-19/+39
On Linux, sockaddr length is required to process unix socket addresses properly due to unnamed sockets (which don't have sun_path set at all) and abstract namespace sockets.
2013-07-05Make macros safe.Gleb Smirnoff3-10/+10
2013-07-03Upstream: updated list of ngx_event_connect_peer() return values.Ruslan Ermilov1-1/+1
ngx_http_upstream_get_keepalive_peer() may return NGX_DONE to indicate that the cached keepalive connection is reused.
2013-06-28Core: consolidated log-related code.Vladimir Homutov4-30/+51
The stderr redirection code is moved to ngx_log_redirect_stderr(). The opening of the default log code is moved to ngx_log_open_default().
2013-07-02Version bump.Maxim Dounin1-2/+2
2013-07-02release-1.5.2 tagMaxim Dounin1-0/+1
2013-07-02nginx-1.5.2-RELEASErelease-1.5.2Maxim Dounin1-0/+49
2013-06-28Fixed ngx_http_parse_chunked() minimal length calculation.Maxim Dounin1-2/+3
Minimal data length we expect for further calls was calculated incorrectly if parsing stopped right after parsing chunk size. This might in theory affect clients and/or backends using LF instead of CRLF. Patch by Dmitry Popov.
2013-06-26Fixed build on Linux with x32 ABI.Maxim Dounin1-2/+7
On Linux x32 inclusion of sys/sysctl.h produces an error. As sysctl() is only used by rtsig event method code, which is legacy and not compiled in by default on modern linuxes, the sys/sysctl.h file now only included if rtsig support is enabled. Based on patch by Serguei I. Ivantsov.
2013-06-20Core: support several "error_log" directives.Vladimir Homutov5-67/+106
When several "error_log" directives are specified in the same configuration block, logs are written to all files with a matching log level. All logs are stored in the singly-linked list that is sorted by log level in the descending order. Specific debug levels (NGX_LOG_DEBUG_HTTP,EVENT, etc.) are not supported if several "error_log" directives are specified. In this case all logs will use debug level that has largest absolute value.
2013-06-19Simplified ngx_list_create().Ruslan Ermilov1-9/+1
2013-06-12Valgrind: another complaint about uninitialized bytes.Tatsuhiko Kubo1-0/+2
2013-06-13SPDY: fixed code style, no functional changes.Valentin Bartenev1-1/+2
2013-06-13Core: moved initialization of log level.Vladimir Homutov2-3/+2
The cycle->new_log->log_level should only be initialized by ngx_init_cycle() if no error logs were found in the configuration. This move allows to get rid of extra initialization in ngx_error_log().
2013-06-07SPDY: pass through the full status when available.Jim Radford1-3/+12
Avoid stripping the status text when proxying for compatibility with http.
2013-06-10Perl: fixed r->header_in("Cookie") (ticket #351).Maxim Dounin1-9/+27
It was broken by X-Forwarded-For related changes in f7fe817c92a2 (1.3.14) as hh->offset is no longer 0 for Cookie.
2013-06-05Fixed debug logging in ngx_http_parse_complex_uri().Maxim Dounin1-2/+2
The *u previously logged isn't yet initialized at this point, and Valgrind complains.
2013-06-05Mail: fixed possible uninitialized memory access.Maxim Dounin1-0/+4
Found by Valgrind.
2013-06-05Valgrind: supressed complaints about uninitialized bytes.Maxim Dounin2-0/+10
Valgrind complains if we pass uninitialized memory to a syscall: ==36492== Syscall param sendmsg(msg.msg_iov[0]) points to uninitialised byte(s) ==36492== at 0x6B5E6A: sendmsg (in /usr/lib/system/libsystem_kernel.dylib) ==36492== by 0x10004288E: ngx_signal_worker_processes (ngx_process_cycle.c:527) ==36492== by 0x1000417A7: ngx_master_process_cycle (ngx_process_cycle.c:203) ==36492== by 0x100001F10: main (nginx.c:410) ==36492== Address 0x7fff5fbff71c is on thread 1's stack Even initialization of all members of the structure passed isn't enough, as there is padding which still remains uninitialized and results in Valgrind complaint. Note there is no real problem here as data from uninitialized memory isn't used.
2013-06-05Valgrind: sigaction() failure now ignored.Maxim Dounin1-0/+5
Valgrind intercepts SIGUSR2 in some cases, and nginx might not be able to start due to sigaction() failure. If compiled with NGX_VALGRIND defined, we now ignore the failure of sigaction().
2013-06-05Status: the "last_in_chain" flag must be set.Valentin Bartenev1-0/+1
The module always produces only one and obviously the last buffer in chain.
2013-06-05SPDY: use proper macros for value length and headers counter.Valentin Bartenev1-2/+2
Currently these macros are synonyms, but this may change in the future (in particular, spdy/3 uses 4 bytes for lengths).
2013-06-04Version bump.Maxim Dounin1-2/+2
2013-06-04Core: fixed handling of "stderr" in error_log.Vladimir Homutov5-4/+9
If "stderr" was specified in one of the "error_log" directives, stderr is not redirected to the first error_log on startup, configuration reload, and reopening log files.
2013-06-03Core: fixed stderr redirection on win32 in ngx_reopen_files().Vladimir Homutov1-7/+4
On win32 stderr was not redirected into a file specified by "error_log" while reopening files. Fix is to use platform-independent functions to work with stderr, as already used by ngx_init_cycle() and main() since rev. d8316f307b6a.
2013-06-04release-1.5.1 tagMaxim Dounin1-0/+1
2013-06-04nginx-1.5.1-RELEASErelease-1.5.1Maxim Dounin1-0/+123
2013-06-04Updated zlib used for win32 builds.Maxim Dounin1-1/+1
2013-05-31Win32: accept_mutex now always disabled (ticket #362).Maxim Dounin1-0/+11
Use of accept mutex on win32 may result in a deadlock if there are multiple worker_processes configured and the mutex is grabbed by a process which can't accept connections.
2013-05-31OCSP stapling: fixed incorrect debug level.Ruslan Ermilov1-1/+1
2013-05-30Access: support for UNIX-domain client addresses (ticket #359).Ruslan Ermilov1-35/+111
2013-05-29Win32: added missing reset of wev->ready on WSAEWOULDBLOCK.Maxim Dounin1-0/+1
This fixes connection hang with websockets proxy, and likely some other places as well.
2013-05-27Upstream: http_403 support in proxy_next_upstream (and friends).Maxim Dounin6-5/+19
The parameter is mostly identical to http_404, and is expected to be used in similar situations. The 403 code might be returned by a backend instead of 404 on initial sync of new directories with rsync. See here for feature request and additional details: http://mailman.nginx.org/pipermail/nginx-ru/2013-April/050920.html
2013-05-24Xslt: xslt_last_modified directive.Maxim Dounin1-4/+22
Directive is similar to ssi_last_modified and sub_filter_last_modified directives introduced by previous commits.
2013-05-24Sub filter: sub_filter_last_modified directive.Maxim Dounin1-1/+14
Directive is similar to ssi_last_modified introduced by previous commit. Patch by Alexey Kolpakov.
2013-05-24SSI: ssi_last_modified directive.Maxim Dounin1-1/+14
The "ssi_last_modified" directive allows to preserve Last-Modified header in SSI responses. The directive is similar to SSILastModified one available in Apache: http://httpd.apache.org/docs/2.4/mod/mod_include.html#ssilastmodified Patch by Alexey Kolpakov.
2013-05-23Core: strengthen configuration syntax checker.Valentin Bartenev1-0/+5
It is now a syntax error if tokens passed to a custom configuration handler are terminated by "{". The following incorrect configuration is now properly rejected: map $v $v2 { a b { c d { e f { }
2013-05-23Memcached: stricten header validation.Ruslan Ermilov1-9/+17
An invalid memcached reply that started with '\n' could cause segmentation fault. An invalid memcached reply "VALUE / 0 2\r?ok\r\nEND\r\n" was considered as a valid response. In addition, if memcached reports that the key was not found, set u->headers_in.content_length_n to 0. This ensures that ngx_http_memcached_filter() will not be called while previous code relied on always intercepting 404. Initialization of ctx->rest was moved to where it belongs.
2013-05-23Use "void" for functions with empty parameter list.Sergey Kandaurov6-7/+7
2013-05-23Configure: fixed test of OS X atomic(3).Ruslan Ermilov1-1/+1
2013-05-21Style: replace SSL *ssl with ngx_ssl_conn_t *ssl_conn.Piotr Sikora2-2/+4
No functional changes. Signed-off-by: Piotr Sikora <piotr@cloudflare.com>
2013-05-21Style: remove unnecessary references to HTTP from non-HTTP modules.Piotr Sikora4-9/+9
No functional changes. Signed-off-by: Piotr Sikora <piotr@cloudflare.com>
2013-05-22Referer module: added $invalid_referer to variables hash.Maxim Dounin1-2/+1
This makes it accessible via dynamic lookup with ngx_http_get_variable() from Perl, SSI, etc. Patch by Yichun Zhang (agentzh).
2013-05-21Upstream: fixed fail_timeout and max_fails > 1.Maxim Dounin2-2/+8
Due to peer->checked always set since rev. c90801720a0c (1.3.0) by round-robin and least_conn balancers (ip_hash not affected), the code in ngx_http_upstream_free_round_robin_peer() function incorrectly reset peer->fails too often. Reported by Dmitry Popov, http://mailman.nginx.org/pipermail/nginx-devel/2013-May/003720.html
2013-05-10Mail: missing ngx_ssl_ecdh_curve() call.F. da Silva1-0/+4
2013-05-21Fixed error logging.Sergey Kandaurov2-5/+3
The provided argument list didn't follow a used format string.