| Commit message (Collapse) | Author | Age |
|
|
|
|
|
| |
Solaris has AT_FDCWD defined to unsigned value, and comparison of a file
descriptor with it causes warnings in modern versions of gcc. Explicitly
cast AT_FDCWD to ngx_fd_t to resolve these warnings.
|
| |
|
| |
|
|
|
|
|
| |
This includes non-absolute pathnames, multiple slashes and trailing
slashes. In collaboration with Valentin Bartenev.
|
|
|
|
|
| |
Notably this fixes NGX_INVALID_FILE/NGX_FILE_ERROR mess, and adds
logging of close() errors. In collaboration with Valentin Bartenev.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
To completely disable symlinks (disable_symlinks on)
we use openat(O_NOFOLLOW) for each path component
to avoid races.
To allow symlinks with the same owner (disable_symlinks if_not_owner),
use openat() (followed by fstat()) and fstatat(AT_SYMLINK_NOFOLLOW),
and then compare uids between fstat() and fstatat().
As there is a race between openat() and fstatat() we don't
know if openat() in fact opened symlink or not. Therefore,
we have to compare uids even if fstatat() reports the opened
component isn't a symlink (as we don't know whether it was
symlink during openat() or not).
Default value is off, i.e. symlinks are allowed.
|
|
|
|
| |
No functional changes.
|
|
|
|
|
|
|
| |
Nuke NGX_PARSE_LARGE_TIME, it's not used since 0.6.30. The only error
ngx_parse_time() can currently return is NGX_ERROR, check it explicitly
and make sure to cast it to appropriate type (either time_t or ngx_msec_t)
to avoid signedness warnings on platforms with unsigned time_t (notably QNX).
|
| |
|
|
|
|
|
| |
The PCRE JIT compiler uses mmap to allocate memory for its executable codes, so
we have to explicitly call the pcre_free_study() function to free this memory.
|
| |
|
| |
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
The ngx_hash_init() function did not expect call with zero elements count,
which caused FPE error on configs with an empty "types" block in http context
and "types_hash_max_size" > 10000.
Example configuration to reproduce:
events { }
http {
types_hash_max_size 10001;
types {}
server {}
}
|
|
|
|
| |
when built with debugging.
|
| |
|
|
|
|
| |
configuration phase.
|
| |
|
|
|
|
| |
The function has been unused since r3326.
|
| |
|
|
|
|
|
|
| |
The "so_keepalive" directive in mail module was deprecated.
Thanks to Vsevolod Stakhov for initial work.
|
| |
|
|
|
|
| |
Requested by Igor Sysoev.
|
|
|
|
| |
Patch by Zaur Abasmirzoev.
|
| |
|
|
|
|
|
|
|
|
|
|
|
| |
It is currently used from master process on abnormal worker termination to
unlock accept mutex (unlocking of accept mutex was broken in 1.0.2). It is
expected to be used in the future to unlock other mutexes as well.
Shared mutex code was rewritten to make this possible in a safe way, i.e.
with a check if lock was actually held by the exited process. We again use
pid to lock mutex, and use separate atomic variable for a count of processes
waiting in sem_wait().
|
| |
|
|
|
|
|
|
|
|
| |
Previously it used a hardcoded value of 300 seconds. Also added the
"valid=" parameter to the "resolver" directive that can be used to
override the cache validity time.
Patch by Kirill A. Korinskiy with minor changes.
|
|
|
|
|
| |
After first upgrade it was ignored since r4020 (1.1.1, 1.0.9) as
ngx_daemonized wasn't set.
|
| |
|
|
|
|
|
| |
for output of ./configure options, etc., since ngx_log_stderr() output
length is limited by 2048 characters defined as NGX_MAX_ERROR_STR.
|
| |
|
|
|
|
| |
Thanks to Ben Hawkes.
|
| |
|
| |
|
|
|
|
| |
Patch by Kirill A. Korinskiy.
|
| |
|
| |
|
|
|
|
| |
The bug has been introduced in r3799.
|
| |
|
|
|
|
| |
Patch by Alexey Kuts.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
For files with '?' in their names autoindex generated links with '?' not
escaped. This resulted in effectively truncated links as '?' indicates
query string start.
This is an updated version of the patch originally posted at [1]. It
introduces generic NGX_ESCAPE_URI_COMPONENT which escapes everything but
unreserved characters as per RFC 3986. This approach also renders unneeded
special colon processing (as colon is percent-encoded now), it's dropped
accordingly.
[1] http://nginx.org/pipermail/nginx-devel/2010-February/000112.html
Reported by Konstantin Leonov.
|
| |
|
| |
|
| |
|
|
|
|
| |
Fixed nearby grammar errors.
|
|
|
|
|
|
| |
The ngx_chain_update_chains() needs pool to free chain links used for buffers
with non-matching tags. Providing one helps to reduce memory consumption
for long-lived requests.
|
| |
|
|
|
|
| |
is still worthwhile.
|
|
|
|
|
|
|
|
|
| |
If file inode was not changed, cached file information was not updated
on retest. As a result stale information might be cached forever if file
attributes was changed and/or file was extended.
This fix also makes obsolete r4077 change of is_directio flag handling,
since this flag is updated together with other file information.
|