summaryrefslogtreecommitdiffhomepage
path: root/src/core (follow)
AgeCommit message (Collapse)AuthorFilesLines
2013-08-20Style improved after 12dd27b74117.Maxim Dounin1-4/+5
2013-08-20Backed out f1a91825730a and 7094bd12c1ff.Maxim Dounin4-15/+19
While ngx_get_full_name() might have a bit more descriptive arguments, the ngx_conf_full_name() is generally easier to use when parsing configuration and limits exposure of cycle->prefix / cycle->conf_prefix details.
2013-08-20Format specifier fixes in error logging.Sergey Kandaurov1-1/+1
2013-08-06API change: removed the ngx_conf_full_name() function.Valentin Bartenev2-12/+0
The ngx_get_full_name() should be used instead.
2013-08-06Replaced ngx_conf_full_name() with ngx_get_full_name().Valentin Bartenev3-7/+15
The ngx_get_full_name() function takes more readable arguments list.
2013-08-06Fixed memory leaks in the root and auth_basic_user_file directives.Valentin Bartenev3-90/+98
If a relative path is set by variables, then the ngx_conf_full_name() function was called while processing requests, which causes allocations from the cycle pool. A new function that takes pool as an argument was introduced.
2013-08-05Core: guard use of AI_ADDRCONFIG.Ruslan Ermilov1-0/+2
Some systems (notably NetBSD and OpenBSD) lack AI_ADDRCONFIG support. Reported by Piotr Sikora.
2013-08-05Fixed build with signed socklen_t and unix sockets.Maxim Dounin1-1/+1
This seems to be the case at least under Cygwin, where build was broken by 05ba5bce31e0 (1.5.3). Reported by Kevin Worthington, http://mailman.nginx.org/pipermail/nginx/2013-August/040028.html.
2013-08-05Core: only resolve address families configured on the local system.Ruslan Ermilov1-0/+1
This is done by passing AI_ADDRCONFIG to getaddrinfo(). On Linux, setting net.ipv6.conf.all.disable_ipv6 to 1 will now be respected. On FreeBSD, AI_ADDRCONFIG filtering is currently implemented by attempting to create a datagram socket for the corresponding family, which succeeds even if the system doesn't in fact have any addresses of that family configured. That is, if the system with IPv6 support in the kernel doesn't have IPv6 addresses configured, AI_ADDRCONFIG will filter out IPv6 only inside a jail without IPv6 addresses or with IPv6 disabled.
2013-07-31Version bump.Sergey Kandaurov1-2/+2
2013-07-25On DragonFlyBSD, TCP_KEEPIDLE and TCP_KEEPINTVL are in msecs.Ruslan Ermilov1-4/+16
Based on a patch by Sepherosa Ziehau.
2013-07-25Style: reuse one int variable in ngx_configure_listening_sockets().Ruslan Ermilov1-11/+8
No functional changes.
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 Homutov3-10/+23
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 Smirnoff1-2/+2
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-06-20Core: support several "error_log" directives.Vladimir Homutov2-40/+102
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-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-04Version bump.Maxim Dounin1-2/+2
2013-06-04Core: fixed handling of "stderr" in error_log.Vladimir Homutov4-4/+8
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-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-21Style: remove unnecessary references to HTTP from non-HTTP modules.Piotr Sikora1-3/+3
No functional changes. Signed-off-by: Piotr Sikora <piotr@cloudflare.com>
2013-05-11Version bump.Maxim Dounin1-2/+2
2013-04-29Version bump.Ruslan Ermilov1-2/+2
2013-04-24Version bump.Maxim Dounin1-2/+2
2013-04-18Version bump.Ruslan Ermilov1-2/+2
2013-03-27Version bump.Maxim Dounin1-2/+2
2013-03-25Use NGX_FILE_ERROR for handling file operations errors.Valentin Bartenev4-6/+8
On Win32 platforms 0 is used to indicate errors in file operations, so comparing against -1 is not portable. This was not much of an issue in patched code, since only ngx_fd_info() test is actually reachable on Win32 and in worst case it might result in bogus error log entry. Patch by Piotr Sikora.
2013-03-21Moved ngx_array_t definition from ngx_core.h to ngx_array.h.Ruslan Ermilov2-3/+2
2013-03-21Use NGX_DEFAULT_POOL_SIZE macro where appropriate.Ruslan Ermilov1-1/+1
2013-03-21Simplified ngx_array_create().Ruslan Ermilov1-7/+1
2013-03-20Core: fixed resource leak if binary upgrade fails due to no memory.Ruslan Ermilov1-0/+1
Found by Coverity (CID 992320).
2013-03-18Core: guard against failed allocation during binary upgrade.Ruslan Ermilov1-0/+3
Patch by Piotr Sikora.
2013-03-15Status: introduced the "ngx_stat_waiting" counter.Valentin Bartenev1-0/+8
And corresponding variable $connections_waiting was added. Previously, waiting connections were counted as the difference between active connections and the sum of reading and writing connections. That made it impossible to count more than one request in one connection as reading or writing (as is the case for SPDY). Also, we no longer count connections in handshake state as waiting.
2013-03-07Removed c->single_connection flag.Valentin Bartenev2-6/+3
The c->single_connection was intended to be used as lock mechanism to serialize modifications of request object from several threads working with client and upstream connections. The flag is redundant since threads in nginx have never been used that way.
2013-03-07Version bump.Valentin Bartenev1-2/+2
2013-02-19Version bump.Valentin Bartenev1-2/+2
2013-02-07Added support for {SHA} passwords (ticket #50).Maxim Dounin1-0/+37
Note: use of {SHA} passwords is discouraged as {SHA} password scheme is vulnerable to attacks using rainbow tables. Use of {SSHA}, $apr1$ or crypt() algorithms as supported by OS is recommended instead. The {SHA} password scheme support is added to avoid the need of changing the scheme recorded in password files from {SHA} to {SSHA} because such a change hides security problem with {SHA} passwords. Patch by Louis Opter, with minor changes.
2013-02-07Version bump.Maxim Dounin1-2/+2
2013-01-17Version bump.Ruslan Ermilov1-2/+2
2013-01-10Fixed "proxy_pass" with IP address and no port (ticket #276).Ruslan Ermilov1-10/+4
Upstreams created by "proxy_pass" with IP address and no port were broken in 1.3.10, by not initializing port in u->sockaddr. API change: ngx_parse_url() was modified to always initialize port (in u->sockaddr and in u->port), even for the u->no_resolve case; ngx_http_upstream() and ngx_http_upstream_add() were adopted.
2013-01-08The data pointer in ngx_open_file_t objects must be initialized.Valentin Bartenev1-0/+1
Uninitialized pointer may result in arbitrary segfaults if access_log is used without buffer and without variables in file path. Patch by Tatsuhiko Kubo (ticket #268).
2012-12-26Version bump.Ruslan Ermilov1-2/+2
2012-12-25Geo: IPv6 support.Ruslan Ermilov2-0/+206
The "ranges" mode is still limited to IPv4 only.
2012-12-23Reopening log files code moved to a separate function.Valentin Bartenev3-48/+6
The code refactored in a way to call custom handler that can do appropriate cleanup work (if any), like flushing buffers, finishing compress streams, finalizing connections to log daemon, etc..
2012-12-22Properly initialize "struct in6_addr" with zeroes.Ruslan Ermilov1-1/+1
2012-12-20Fixed return type of internal function that allocates radix tree nodes.Ruslan Ermilov1-5/+5