summaryrefslogtreecommitdiffhomepage
path: root/src (follow)
AgeCommit message (Collapse)AuthorFilesLines
2012-01-30Removed ENGINE_load_builtin_engines() call.Maxim Dounin1-2/+0
It's already called by OPENSSL_config(). Calling it again causes some openssl engines (notably GOST) to corrupt memory, as they don't expect to be created more than once.
2012-01-24Fixed grammar in PCRE JIT error log message.Valentin Bartenev1-1/+1
2012-01-18Copyright updated.Maxim Konovalov287-0/+287
2012-01-18Version bump.Maxim Konovalov1-1/+2
2012-01-18Version bump.Maxim Konovalov1-2/+2
2012-01-16Fixed division by zero exception in ngx_hash_init().Valentin Bartenev1-1/+1
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 {} }
2012-01-16Fixed sched_setaffinity(2) to correctly pass size.Maxim Dounin1-1/+4
Second argument (cpusetsize) is size in bytes, not in bits. Previously used constant 32 resulted in reading of uninitialized memory and caused EINVAL to be returned on some Linux kernels.
2012-01-16Fixed handling of mp4 above 2G and 32bit offsets (ticket #84).Maxim Dounin1-4/+4
2012-01-16Fixed proxy_cache_use_stale in "no live upstreams" case.Maxim Dounin4-5/+21
2012-01-11Added support for TLSv1.1, TLSv1.2 in ssl_protocols directive.Maxim Dounin5-20/+34
Support for TLSv1.1 and TLSv1.2 protocols was introduced in OpenSSL 1.0.1 (-beta1 was recently released). This change makes it possible to disable these protocols and/or enable them without other protocols.
2012-01-11Fixed limit_req burst/nodelay inheritance (ticket #76).Maxim Dounin1-0/+2
The problem was introduced in r4381 (1.1.12).
2012-01-10Fixed: proxy_redirect with regex might broke Refresh header.Valentin Bartenev1-1/+19
The problem was localized in ngx_http_proxy_rewrite_redirect_regex() handler function which did not take into account prefix when overwriting header value.
2012-01-10Changed ngx_log_debugN() macros to verify the number of argumentsRuslan Ermilov1-9/+32
when built with debugging.
2011-12-27Version bump.Maxim Dounin2-3/+3
2011-12-26Added support for regex study and PCRE JIT (ticket #41) optimizations onValentin Bartenev2-7/+216
configuration phase.
2011-12-26Fixed build without debug.Maxim Dounin1-2/+2
2011-12-26Cache lock support for fastcgi, scgi, uwsgi.Maxim Dounin3-0/+66
2011-12-26Cache locks initial implementation.Maxim Dounin5-14/+181
New directives: proxy_cache_lock on/off, proxy_cache_lock_timeout. With proxy_cache_lock set to on, only one request will be allowed to go to upstream for a particular cache item. Others will wait for a response to appear in cache (or cache lock released) up to proxy_cache_lock_timeout. Waiting requests will recheck if they have cached response ready (or are allowed to run) every 500ms. Note: we intentionally don't intercept NGX_DECLINED possibly returned by ngx_http_file_cache_read(). This needs more work (possibly safe, but needs further investigation). Anyway, it's exceptional situation. Note: probably there should be a way to disable caching of responses if there is already one request fetching resource to cache (without waiting at all). Two possible ways include another cache lock option ("no_cache") or using proxy_no_cache with some supplied variable. Note: probably there should be a way to lock updating requests as well. For now "proxy_cache_use_stale updating" is available.
2011-12-26Fixed interaction of limit_rate and sendfile_max_chunk.Maxim Dounin1-7/+11
It's possible that configured limit_rate will permit more bytes per single operation than sendfile_max_chunk. To protect disk from takeover by a single client it is necessary to apply sendfile_max_chunk as a limit regardless of configured limit_rate. See here for report (in Russian): http://mailman.nginx.org/pipermail/nginx-ru/2010-March/032806.html
2011-12-26Fixed throughput problems with large limit_rate.Maxim Dounin1-1/+1
Previous attempt to fix this was in r1658 (0.6.18), though that one wasn't enough (it was a noop).
2011-12-26Fixed mp4 if first entry in stsc was skipped (ticket #72).Maxim Dounin1-0/+2
If first entry in stsc atom was skipped, and seek was to chunk boundary, than first_chunk in the generated stsc table wasn't set to 1.
2011-12-25SSI: added regex captures support in the expression of the "if" command.Valentin Bartenev2-29/+148
2011-12-25Fixed limit_conn_log_level/limit_req_log_level inheritance.Valentin Bartenev2-2/+2
The directives did not work if there were no limit_conn/limit_req specified on the same level.
2011-12-23Proxy: made proxy_pass with variables more consistent.Maxim Dounin1-6/+3
If proxy_pass was used with variables and there was no URI component, nginx always used unparsed URI. This isn't consistent with "no variables" case, where e.g. rewrites are applied even if there is no URI component. Fix is to use the same logic in both cases, i.e. only use unparsed URI if it's valid and request is the main one.
2011-12-19Added clearing of r->valid_unparsed_uri on internal redirects.Maxim Dounin2-2/+1
This resolves issue with try_files (see ticket #70), configuration like location / { try_files $uri /index.php; } location /index.php { proxy_pass http://backend; } caused nginx to use original request uri in a request to a backend. Historically, not clearing of the r->valid_unparsed_uri on internal redirect was a feature: it allowed to pass the same request to (another) upstream server via error_page redirection. Since then named locations appeared though, and it's time to start resetting r->valid_unparsed_uri on internal redirects. Configurations still using this feature should be converted to use named locations instead. Patch by Lanshun Zhou.
2011-12-19SSI bugfix: the "if" command did not work inside the "block" command andValentin Bartenev1-10/+10
produced parsing errors.
2011-12-19Scgi: removed error if there is no Status header.Maxim Dounin1-3/+0
The SCGI specification doesn't specify format of the response, and assuming CGI specs should be used there is no reason to complain. RFC 3875 explicitly states that "A Status header field is optional, and status 200 'OK' is assumed if it is omitted".
2011-12-19Scgi: removed duplicate function declaration.Maxim Dounin1-1/+0
2011-12-19Fixed incorrect use of r->http_version in scgi module.Maxim Dounin1-9/+3
The r->http_version is a version of client's request, and modules must not set it unless they are really willing to downgrade protocol version used for a response (i.e. to HTTP/0.9 if no response headers are available). In neither case r->http_version may be upgraded. The former code downgraded response from HTTP/1.1 to HTTP/1.0 for no reason, causing various problems (see ticket #66). It was also possible that HTTP/0.9 requests were upgraded to HTTP/1.0.
2011-12-19Version bump.Maxim Dounin2-2/+2
2011-12-12Cache: only complain on long locked entries.Maxim Dounin1-3/+3
There have been multiple reports of cases where a real locked entry was removed, resulting in a segmentation fault later in a worker which locked the entry. It looks like default inactive timeout isn't enough in real life. For now just ignore such locked entries, and move them to the top of the inactive queue to allow processing of other entries.
2011-12-12Cache: handling of cache files with long headers.Maxim Dounin1-0/+7
There are two possible situations which can lead to this: response was cached with bigger proxy_buffer_size value (and nginx was restared since then, i.e. shared memory zone content was lost), or due to the race in the cache update code (see [1]) we've end up with fcn->body_start from a different response stored in shared memory zone. [1] http://mailman.nginx.org/pipermail/nginx-devel/2011-September/001287.html
2011-12-12Cache: obsolete code removed.Maxim Dounin1-66/+0
The ngx_http_cache() and ngx_http_no_cache_set_slot() functions were replaced by ngx_http_test_predicates() and ngx_http_set_predicate_slot() in 0.8.46 and no longer used since then.
2011-12-12Renamed some constants to improve readability, no functional changes.Ruslan Ermilov1-17/+14
2011-12-12Proxy: added variables and regexp support to the first parameter ofValentin Bartenev1-99/+119
the "proxy_redirect" directive.
2011-12-11Microoptimization of sendfile(2) usage under FreeBSD.Maxim Dounin1-2/+7
FreeBSD kernel checks headers/trailers pointer against NULL, not corresponding count. Passing NULL if there are no headers/trailers helps to avoid unneeded work in kernel, as well as unexpected 0 bytes GIO in traces.
2011-12-09Fixed: some of $sent_http_* variables may contain header entries that actuallyValentin Bartenev1-12/+29
haven't been sent to a client. The ngx_http_variable_headers() and ngx_http_variable_unknown_header() functions did not ignore response header entries with zero "hash" field. Thanks to Yichun Zhang (agentzh).
2011-12-09Added the $https variable.Valentin Bartenev1-0/+28
2011-12-09SCGI: added "if_not_empty" flag support to the "scgi_param" directive.Valentin Bartenev1-14/+60
2011-12-09uwsgi: added "if_not_empty" flag support to the "uwsgi_param" directive.Valentin Bartenev1-7/+44
2011-12-09FastCGI: added "if_not_empty" flag support to the "fastcgi_param" directive.Valentin Bartenev1-7/+44
2011-12-09Added the ngx_http_upstream_param_set_slot().Valentin Bartenev2-0/+53
2011-12-06- Improved error message when parsing of the "buffer" parameter of theRuslan Ermilov1-1/+7
"access_log" directive fails. - Added a warning if "log_format" is used in contexts other than "http".
2011-12-06Removed unused function ngx_regex_capture_count().Valentin Bartenev1-17/+0
The function has been unused since r3326.
2011-12-06Fix for read_head with try_files and open_file_cache.Maxim Dounin1-0/+1
The of.read_ahead wasn't set in try_files code path, causing read_ahead directive to be a nop if try_files and open_file_cache were used.
2011-12-06Version bump.Maxim Dounin2-3/+3
2011-12-05Added the "so_keepalive=" parameter to the "listen" directive.Valentin Bartenev8-1/+283
The "so_keepalive" directive in mail module was deprecated. Thanks to Vsevolod Stakhov for initial work.
2011-11-29Fixed AIO on Linux, broken in r4306.Maxim Dounin1-10/+10
Events from eventfd do not have c->write set, and the stale event check added in r4306 causes null pointer dereference.
2011-11-29Version bump.Maxim Dounin2-3/+3
2011-11-28Added (void) as we intentionally ignore returned values.Maxim Dounin2-2/+2
Requested by Igor Sysoev.