Commit graph

3906 commits

Author SHA1 Message Date
Maxim Dounin
4759803fcd Fixed AIO error handling on FreeBSD.
The aio_return() must be called regardless of the error returned by
aio_error().  Not calling it resulted in various problems up to segmentation
faults (as AIO events are level-triggered and were reported again and again).

Additionally, in "aio sendfile" case r->blocked was incremented in case of
error returned from ngx_file_aio_read(), thus causing request hangs.
2012-01-30 07:39:47 +00:00
Maxim Dounin
a8362260c5 Removed ENGINE_load_builtin_engines() call.
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-30 07:38:27 +00:00
Valentin Bartenev
c67c399aba Fixed grammar in PCRE JIT error log message. 2012-01-24 10:20:42 +00:00
Maxim Konovalov
0330b7ef84 Copyright updated. 2012-01-18 15:07:43 +00:00
Maxim Konovalov
27418f6b88 Version bump. 2012-01-18 15:04:17 +00:00
Maxim Konovalov
2bad3828ce Version bump. 2012-01-18 14:33:17 +00:00
Ruslan Ermilov
1fdaac7c1b Fixed spelling. 2012-01-17 07:09:51 +00:00
Maxim Dounin
6181007a4b release-1.1.13 tag 2012-01-16 15:15:01 +00:00
Maxim Dounin
4025c3da41 nginx-1.1.13-RELEASE 2012-01-16 15:14:37 +00:00
Maxim Dounin
2a9140cb9f Updated OpenSSL version used for win32 build. 2012-01-16 15:10:36 +00:00
Igor Sysoev
3d0626aa0a 2012 year. 2012-01-16 14:31:15 +00:00
Valentin Bartenev
a07b39def4 Fixed division by zero exception in ngx_hash_init().
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-16 12:42:07 +00:00
Maxim Dounin
07400a51a0 Fixed sched_setaffinity(2) to correctly pass size.
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-16 11:13:48 +00:00
Maxim Dounin
0a482a2731 Fixed handling of mp4 above 2G and 32bit offsets (ticket #84). 2012-01-16 11:03:27 +00:00
Maxim Dounin
b16574cc45 Fixed proxy_cache_use_stale in "no live upstreams" case. 2012-01-16 11:01:52 +00:00
Maxim Dounin
b929dfb429 Added support for TLSv1.1, TLSv1.2 in ssl_protocols directive.
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-11 11:15:00 +00:00
Maxim Dounin
95bbcfcfb0 Fixed limit_req burst/nodelay inheritance (ticket #76).
The problem was introduced in r4381 (1.1.12).
2012-01-11 11:09:05 +00:00
Valentin Bartenev
56b9f427e8 Fixed: proxy_redirect with regex might broke Refresh header.
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-10 15:09:45 +00:00
Ruslan Ermilov
de12e8a6ea Changed ngx_log_debugN() macros to verify the number of arguments
when built with debugging.
2012-01-10 07:28:32 +00:00
Valentin Bartenev
fcb581b929 Fixed configure with system PCRE library on Solaris.
The bug has been introduced in r4389.
2011-12-29 15:58:53 +00:00
Maxim Konovalov
8eb05fbc39 Some questionable optomizations flags for icc were removed
in order to simplify support of its future versions.
2011-12-29 15:36:07 +00:00
Maxim Dounin
9a4e6534ec Fixed punctuation. 2011-12-28 13:30:56 +00:00
Sergey Budnevitch
21d6f34287 libraries versions updated 2011-12-27 12:39:11 +00:00
Sergey Budnevitch
f8fd16fa5e zlib license file include fixed 2011-12-27 12:35:52 +00:00
Maxim Dounin
7d6f981a87 Version bump. 2011-12-27 11:56:48 +00:00
Maxim Dounin
59c811207a release-1.1.12 tag 2011-12-26 15:05:38 +00:00
Maxim Dounin
b4ba849348 nginx-1.1.12-RELEASE 2011-12-26 15:05:17 +00:00
Valentin Bartenev
498cc8846a Added support for regex study and PCRE JIT (ticket #41) optimizations on
configuration phase.
2011-12-26 13:10:36 +00:00
Maxim Dounin
2e6a0bc9a3 Fixed build without debug. 2011-12-26 11:33:11 +00:00
Maxim Dounin
01626586ef Cache lock support for fastcgi, scgi, uwsgi. 2011-12-26 11:16:19 +00:00
Maxim Dounin
79b20c6b5a Cache locks initial implementation.
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-26 11:15:23 +00:00
Maxim Dounin
5254ac2214 Fixed interaction of limit_rate and sendfile_max_chunk.
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-26 10:51:24 +00:00
Maxim Dounin
812f376092 Fixed throughput problems with large limit_rate.
Previous attempt to fix this was in r1658 (0.6.18), though that one wasn't
enough (it was a noop).
2011-12-26 10:49:57 +00:00
Maxim Dounin
b59d1cbb0d Fixed mp4 if first entry in stsc was skipped (ticket #72).
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-26 10:49:03 +00:00
Valentin Bartenev
45bf93e9a3 SSI: added regex captures support in the expression of the "if" command. 2011-12-25 20:08:37 +00:00
Valentin Bartenev
5fe3db9986 Fixed limit_conn_log_level/limit_req_log_level inheritance.
The directives did not work if there were no limit_conn/limit_req specified on
the same level.
2011-12-25 19:32:31 +00:00
Valentin Bartenev
47bf52865b Added the HTTPS fastcgi_param to fastcgi.conf. 2011-12-25 19:15:56 +00:00
Maxim Konovalov
3a82e1a32e Words duplications removed. 2011-12-24 06:31:57 +00:00
Maxim Dounin
daa03354a1 Proxy: made proxy_pass with variables more consistent.
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-23 16:04:09 +00:00
Sergey Budnevitch
5a87dab604 configure on Solaris fixed 2011-12-20 16:20:23 +00:00
Maxim Dounin
3d27592e55 Added clearing of r->valid_unparsed_uri on internal redirects.
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-19 14:11:48 +00:00
Valentin Bartenev
83a44c4911 SSI bugfix: the "if" command did not work inside the "block" command and
produced parsing errors.
2011-12-19 13:28:22 +00:00
Maxim Dounin
55d48371c1 Scgi: removed error if there is no Status header.
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-19 11:25:40 +00:00
Maxim Dounin
ad51cbc3fe Scgi: removed duplicate function declaration. 2011-12-19 11:24:32 +00:00
Maxim Dounin
1a19f79ca8 Fixed incorrect use of r->http_version in scgi module.
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-19 11:23:16 +00:00
Maxim Dounin
b73c0ebb43 Version bump. 2011-12-19 11:21:46 +00:00
Maxim Dounin
2bb6abc200 release-1.1.11 tag 2011-12-12 14:18:15 +00:00
Maxim Dounin
b02bc82b60 nginx-1.1.11-RELEASE 2011-12-12 14:17:49 +00:00
Maxim Dounin
d603e24018 Fixed RELEASE target again. 2011-12-12 12:39:19 +00:00
Maxim Dounin
9be0b7043b Fixed RELEASE target to correctly call "release" one. 2011-12-12 11:00:17 +00:00