aboutsummaryrefslogtreecommitdiff
path: root/src/core
Commit message (Collapse)AuthorAge
* Version bump.Maxim Dounin2013-11-29
|
* Core: handling of getsockopt(TCP_DEFER_ACCEPT) failures.Maxim Dounin2013-10-31
| | | | | | Recent Linux versions started to return EOPNOTSUPP to getsockopt() calls on unix sockets, resulting in log pollution on binary upgrade. Such errors are silently ignored now.
* Core: apply missed options to sockets added during binary upgrade.Piotr Sikora2013-10-24
| | | | | | | The accept_filter and deferred options were not applied to sockets that were added to configuration during binary upgrade cycle. Signed-off-by: Piotr Sikora <piotr@cloudflare.com>
* Version bump.Sergey Kandaurov2013-10-02
|
* Added ngx_filename_cmp() with "/" sorted to the left.Maxim Dounin2013-09-23
| | | | | | | | | | | | | | | | | | | | | | This patch fixes incorrect handling of auto redirect in configurations like: location /0 { } location /a- { } location /a/ { proxy_pass ... } With previously used sorting, this resulted in the following locations tree (as "-" is less than "/"): "/a-" "/0" "/a/" and a request to "/a" didn't match "/a/" with auto_redirect, as it didn't traverse relevant tree node during lookup (it tested "/a-", then "/0", and then falled back to null location). To preserve locale use for non-ASCII characters on case-insensetive systems, libc's tolower() used.
* Core: fix misallocation at ngx_crypt_apr1 (ticket #412).Markus Linnala2013-09-20
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Found by using auth_basic.t from mdounin nginx-tests under valgrind. ==10470== Invalid write of size 1 ==10470== at 0x43603D: ngx_crypt_to64 (ngx_crypt.c:168) ==10470== by 0x43648E: ngx_crypt (ngx_crypt.c:153) ==10470== by 0x489D8B: ngx_http_auth_basic_crypt_handler (ngx_http_auth_basic_module.c:297) ==10470== by 0x48A24A: ngx_http_auth_basic_handler (ngx_http_auth_basic_module.c:240) ==10470== by 0x44EAB9: ngx_http_core_access_phase (ngx_http_core_module.c:1121) ==10470== by 0x44A822: ngx_http_core_run_phases (ngx_http_core_module.c:895) ==10470== by 0x44A932: ngx_http_handler (ngx_http_core_module.c:878) ==10470== by 0x455EEF: ngx_http_process_request (ngx_http_request.c:1852) ==10470== by 0x456527: ngx_http_process_request_headers (ngx_http_request.c:1283) ==10470== by 0x456A91: ngx_http_process_request_line (ngx_http_request.c:964) ==10470== by 0x457097: ngx_http_wait_request_handler (ngx_http_request.c:486) ==10470== by 0x4411EE: ngx_epoll_process_events (ngx_epoll_module.c:691) ==10470== Address 0x5866fab is 0 bytes after a block of size 27 alloc'd ==10470== at 0x4A074CD: malloc (vg_replace_malloc.c:236) ==10470== by 0x43B251: ngx_alloc (ngx_alloc.c:22) ==10470== by 0x421B0D: ngx_malloc (ngx_palloc.c:119) ==10470== by 0x421B65: ngx_pnalloc (ngx_palloc.c:147) ==10470== by 0x436368: ngx_crypt (ngx_crypt.c:140) ==10470== by 0x489D8B: ngx_http_auth_basic_crypt_handler (ngx_http_auth_basic_module.c:297) ==10470== by 0x48A24A: ngx_http_auth_basic_handler (ngx_http_auth_basic_module.c:240) ==10470== by 0x44EAB9: ngx_http_core_access_phase (ngx_http_core_module.c:1121) ==10470== by 0x44A822: ngx_http_core_run_phases (ngx_http_core_module.c:895) ==10470== by 0x44A932: ngx_http_handler (ngx_http_core_module.c:878) ==10470== by 0x455EEF: ngx_http_process_request (ngx_http_request.c:1852) ==10470== by 0x456527: ngx_http_process_request_headers (ngx_http_request.c:1283) ==10470==
* Version bump.Sergey Kandaurov2013-09-18
|
* Improved check for duplicate path names in ngx_add_path().Valentin Bartenev2013-09-16
| | | | | | | | | The same path names with different "data" context should not be allowed. In particular it rejects configurations like this: proxy_cache_path /var/cache/ keys_zone=one:10m max_size=1g inactive=5m; proxy_cache_path /var/cache/ keys_zone=two:20m max_size=4m inactive=30s;
* Removed surplus initializations from ngx_conf_set_path_slot().Valentin Bartenev2013-09-16
| | | | An instance of ngx_path_t is already zeroed by ngx_pcalloc().
* Use ngx_pcalloc() in ngx_conf_merge_path_value().Valentin Bartenev2013-09-16
| | | | | It initializes the "data" pointer of ngx_path_t that will be checked after subsequent changes.
* Handling of ngx_int_t != intptr_t case.Maxim Dounin2013-09-04
| | | | | | | | | Casts between pointers and integers produce warnings on size mismatch. To silence them, cast to (u)intptr_t should be used. Prevoiusly, casts to ngx_(u)int_t were used in some cases, and several ngx_int_t expressions had no casts. As of now it's mostly style as ngx_int_t is defined as intptr_t.
* Win32: MinGW GCC compatibility.Maxim Dounin2013-09-04
| | | | | | | | | Several warnings silenced, notably (ngx_socket_t) -1 is now checked on socket operations instead of -1, as ngx_socket_t is unsigned on win32 and gcc complains on comparison. With this patch, it's now possible to compile nginx using mingw gcc, with options we normally compile on win32.
* Win32: Open Watcom C compatibility fixes.Maxim Dounin2013-09-04
| | | | | | | | | Precompiled headers are disabled as they lead to internal compiler errors with long configure lines. Couple of false positive warnings silenced. Various win32 typedefs are adjusted to work with Open Watcom C 1.9 headers. With this patch, it's now again possible to compile nginx using owc386, with options we normally compile on win32 minus ipv6 and ssl.
* Disable symlinks: removed recursive call of ngx_file_o_path_info().Valentin Bartenev2013-09-02
| | | | It is surplus.
* Disable symlinks: use O_PATH to open path components.Valentin Bartenev2013-09-02
| | | | | | | | | | | | | | | | | It was introduced in Linux 2.6.39, glibc 2.14 and allows to obtain file descriptors without actually opening files. Thus made it possible to traverse path with openat() syscalls without the need to have read permissions for path components. It is effectively emulates O_SEARCH which is missing on Linux. O_PATH is used in combination with O_RDONLY. The last one is ignored if O_PATH is used, but it allows nginx to not fail when it was built on modern system (i.e. glibc 2.14+) and run with a kernel older than 2.6.39. Then O_PATH is unknown to the kernel and ignored, while O_RDONLY is used. Sadly, fstat() is not working with O_PATH descriptors till Linux 3.6. As a workaround we fallback to fstatat() with the AT_EMPTY_PATH flag that was introduced at the same time as O_PATH.
* Version bump.Maxim Dounin2013-08-28
|
* Style improved after 12dd27b74117.Maxim Dounin2013-08-20
|
* Backed out f1a91825730a and 7094bd12c1ff.Maxim Dounin2013-08-20
| | | | | | | 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.
* Format specifier fixes in error logging.Sergey Kandaurov2013-08-20
|
* API change: removed the ngx_conf_full_name() function.Valentin Bartenev2013-08-06
| | | | The ngx_get_full_name() should be used instead.
* Replaced ngx_conf_full_name() with ngx_get_full_name().Valentin Bartenev2013-08-06
| | | | The ngx_get_full_name() function takes more readable arguments list.
* Fixed memory leaks in the root and auth_basic_user_file directives.Valentin Bartenev2013-08-06
| | | | | | | | 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.
* Core: guard use of AI_ADDRCONFIG.Ruslan Ermilov2013-08-05
| | | | | | Some systems (notably NetBSD and OpenBSD) lack AI_ADDRCONFIG support. Reported by Piotr Sikora.
* Fixed build with signed socklen_t and unix sockets.Maxim Dounin2013-08-05
| | | | | | | | 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.
* Core: only resolve address families configured on the local system.Ruslan Ermilov2013-08-05
| | | | | | | | | | | | | | | 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.
* Version bump.Sergey Kandaurov2013-07-31
|
* On DragonFlyBSD, TCP_KEEPIDLE and TCP_KEEPINTVL are in msecs.Ruslan Ermilov2013-07-25
| | | | Based on a patch by Sepherosa Ziehau.
* Style: reuse one int variable in ngx_configure_listening_sockets().Ruslan Ermilov2013-07-25
| | | | No functional changes.
* Core: fixed possible use of an uninitialized variable.Vladimir Homutov2013-07-11
| | | | | | | | 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.
* Core: extended ngx_sock_ntop() with socklen parameter.Vladimir Homutov2013-07-11
| | | | | | 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.
* Make macros safe.Gleb Smirnoff2013-07-05
|
* Core: consolidated log-related code.Vladimir Homutov2013-06-28
| | | | | 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().
* Version bump.Maxim Dounin2013-07-02
|
* Core: support several "error_log" directives.Vladimir Homutov2013-06-20
| | | | | | | | | | | | 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.
* Simplified ngx_list_create().Ruslan Ermilov2013-06-19
|
* Core: moved initialization of log level.Vladimir Homutov2013-06-13
| | | | | | 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().
* Version bump.Maxim Dounin2013-06-04
|
* Core: fixed handling of "stderr" in error_log.Vladimir Homutov2013-06-04
| | | | | | 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.
* Core: fixed stderr redirection on win32 in ngx_reopen_files().Vladimir Homutov2013-06-03
| | | | | | | 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.
* Core: strengthen configuration syntax checker.Valentin Bartenev2013-05-23
| | | | | | | | | | | | | 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 { }
* Style: remove unnecessary references to HTTP from non-HTTP modules.Piotr Sikora2013-05-21
| | | | | | No functional changes. Signed-off-by: Piotr Sikora <piotr@cloudflare.com>
* Version bump.Maxim Dounin2013-05-11
|
* Version bump.Ruslan Ermilov2013-04-29
|
* Version bump.Maxim Dounin2013-04-24
|
* Version bump.Ruslan Ermilov2013-04-18
|
* Version bump.Maxim Dounin2013-03-27
|
* Use NGX_FILE_ERROR for handling file operations errors.Valentin Bartenev2013-03-25
| | | | | | | | | | | 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.
* Moved ngx_array_t definition from ngx_core.h to ngx_array.h.Ruslan Ermilov2013-03-21
|
* Use NGX_DEFAULT_POOL_SIZE macro where appropriate.Ruslan Ermilov2013-03-21
|
* Simplified ngx_array_create().Ruslan Ermilov2013-03-21
|