Commit graph

3565 commits

Author SHA1 Message Date
Igor Sysoev
287e2cae6d Merging r4130, r4131, r4135:
Linux AIO related fixes:

*) Fixing Linux AIO syscalls return value handling:
syscall(2) uses usual libc convention, it returns -1 on error and
sets errno. Obsolete _syscall(2) returns negative value of error.

*) Fixing Linux AIO initiatialization: AIO operations are disabled
if kernel does not support them.  Previously worker just exited.

*) The "worker_aio_requests" directive.

The default value is 32 AIO simultaneous requests per worker. Previously
they were hardcoded to 1024, and it was too large, since Linux allocated
them early on io_setup(), but not on request itself. So with default value
of /proc/sys/fs/aio-max-nr equal to 65536 only 64 worker processes could
be run simultaneously. 32 AIO requests are enough for modern disks even if
server runs only 1 worker.
2011-09-30 14:12:53 +00:00
Igor Sysoev
6f23d1a581 Merging r4098:
In Mac OS X Lion, Apple deprecated the use of the system OpenSSL library
in favour of their CommonCrypto library.  This change adds a work-around
that allows nginx to still be built on Lion with OpenSSL.
2011-09-30 14:09:44 +00:00
Igor Sysoev
0b2b252cfb Merging r4036, r4055, r4056, r4057, r4058, r4059, r4060, r4061, r4062, r4063,
r4064:

Ranges related fixes:

The "max_ranges" directive.
"max_ranges 0" disables ranges support at all,
"max_ranges 1" allows the single range, etc.
By default number of ranges is unlimited, to be precise, 2^31-1.

If client requests more ranges than "max_ranges" permits,
nginx disables ranges and returns just the source response.

If total size of all ranges is greater than source response size,
then nginx disables ranges and returns just the source response.
This fix should not affect well-behaving applications but will defeat
DoS attempts exploiting malicious byte ranges.

Now unsatisfiable ranges are processed according to RFC 2616.
2011-09-30 14:06:08 +00:00
Igor Sysoev
66ef8eba59 Merging r4077, r4101, r4102:
open_file_cache related fixes:

*) Bugfix: open_file_cache lost is_directio flag.

On file retest open_file_cache lost is_directio if file wasn't changed.
This caused unaligned operations under Linux to fail with EINVAL.
It wasn't noticeable with AIO though, as errors wasn't properly logged.

*) Bugfix: open_file_cache did not update file info on retest.

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.
2011-09-30 13:57:44 +00:00
Igor Sysoev
86553d2e0a Merging r4010, r4065:
SSL related fixes:

*) Fixing proxy_set_body and proxy_pass_request_body with SSL.

Flush flag wasn't set in constructed buffer and this prevented any data
from being actually sent to upstream due to SSL buffering.  Make sure
we always set flush in the last buffer we are going to sent.

See here for report:
http://nginx.org/pipermail/nginx-ru/2011-June/041552.html

*) Proper SSL shutdown handling.

If connection has unsent alerts, SSL_shutdown() tries to send them even
if SSL_set_shutdown(SSL_RECEIVED_SHUTDOWN|SSL_SENT_SHUTDOWN) was used.
This can be prevented by SSL_set_quiet_shutdown().  SSL_set_shutdown()
is required nevertheless to preserve session.
2011-09-30 13:42:59 +00:00
Igor Sysoev
4918eb4407 Merging r3933, r4154:
A new fix for the case when ssl_session_cache defined, but ssl is not
enabled in any server. The previous r1033 does not help when unused zone
becomes used after reconfiguration, so it is backed out.

The initial thought was to make SSL modules independed from SSL implementation
and to keep OpenSSL code dependance as much as in separate files.
2011-09-30 13:36:33 +00:00
Igor Sysoev
05596e5839 Version bump. 2011-09-30 13:24:49 +00:00
Igor Sysoev
6290ef9686 Fix of release date. 2011-08-29 14:43:51 +00:00
Igor Sysoev
dc54321d5c release-1.0.6 tag 2011-08-29 14:28:31 +00:00
Igor Sysoev
1d24030a68 nginx-1.0.6-RELEASE 2011-08-29 14:28:23 +00:00
Igor Sysoev
5c4e11692d Merge of r4016:
Fix ignored headers handling in fastcgi/scgi/uwsgi.

The bug had appeared in r3561 (fastcgi), r3638 (scgi), r3567 (uwsgi).
2011-08-29 14:13:46 +00:00
Igor Sysoev
15490855b8 Getting rid of " <br/>" hacks. 2011-08-29 14:03:06 +00:00
Igor Sysoev
ed5151688d CHANGES conversion from KOI8-R to UTF-8. 2011-08-29 14:02:15 +00:00
Igor Sysoev
ef0316bb82 Merge of r3996, r3998, r4015, r4023, r4025, r4026, r4027:
Changes log build procedure fixes:

*) using sed instead of perl
*) support <br/> in the middle of input
*) fixed "<br>" lookup (eliminates the need in " <br/>" hacks)
*) fixed maximum length for unbreakable input
*) fixed space lookup (allows a space at column 77 to break a line)
*) traling spaces removal in text CHANGES files.
2011-08-29 13:57:43 +00:00
Igor Sysoev
ee7216bfa6 Merge of r4018:
Fix buffer overrun under Windows.
2011-08-29 13:11:47 +00:00
Igor Sysoev
8f8839f98d Merge of r3964, r3977, r3978:
Proxy related fixes:

*) finalizing with rc == 0 in unbuffered proxy mode caused nginx to wait
   for another send_timeout before actually closing client's connection
   if client timed out while still talking to upstream server
*) update r3945 with more descriptive error message
*) test length of proxy_pass with variables;
   patch by Lanshun Zhou
2011-08-29 12:56:09 +00:00
Igor Sysoev
1c95e6c305 Merge of r4004, r4005:
Solaris related fixes:

*) Detect POSIX semaphores in librt on Solaris (ticket #3).
   Patch by Denis Ivanov.
*) Lower optimization level for Sun Studio before 12.1.
   At least Sun Studio 12 has problems with bit-fields exposed by nginx code
   (caught by test suite).  They seems to be fixed in Sun Studio 12.1.  As a
   workaround use "-fast -xalias_level=any" for older versions, it resolves
   the problem.
2011-08-29 12:50:35 +00:00
Igor Sysoev
ef24db717c Merge of r4003:
Configure: catch up with new Linux version numbering (ticket #5).

Catch up with new Linux version numbering scheme as announced at [1] and
suppress unrecognized versions to actually use default 0.

[1] https://lkml.org/lkml/2011/5/29/204
2011-08-29 12:47:32 +00:00
Igor Sysoev
65a179b308 Merge of r3982, r3984, r3985, r3991:
Lingering closing related fixes:

*) lingering_close "off|on|always"
*) enable lingering close for pipelined requests
*) do not send RST on normal lingering close read timeout,
   if reset_timedout_connection is on
2011-08-29 12:45:03 +00:00
Igor Sysoev
6bf8152c6c Merge of r3960, r3961, r3962, r3963, r3965:
SSL related fixes:

*) MSIE export versions are rare now, so RSA 512 key is generated on demand
   and is shared among all hosts instead of pregenerating for every HTTPS host
   on configuraiton phase. This decreases start time for configuration with
   large number of HTTPS hosts.
*) ECDHE support; patch by Adrian Kotelba
*) fix build by gcc46 with -Wunused-value option
*) fix SSL connection issues on platforms with 32-bit off_t
*) do not try to reuse and save a SSL session for a peer created on the fly
   by ngx_http_upstream_create_round_robin_peer(), since the peer lives
   only during request so the saved SSL session will never be used again
   and just causes memory leak
2011-08-29 12:35:53 +00:00
Igor Sysoev
1a6c657f77 Merge of r3979, r3980, r3981, r3983, r3987, r3994, r3995:
Accept-Encoding refactoring:
*) "gzip; q=0" support
*) and removal of ancient MSIE 4.x test for gzip
2011-08-29 10:39:23 +00:00
Igor Sysoev
ee25a6384c Merge of r3972, r3973, r3974:
Cache fixes:

*) do not close connection if cache file is too small: replace it with
   valid one
*) rename ngx_http_file_cache_manager_sleep() to
   ngx_http_file_cache_loader_sleep() and do not use it all in cache manager:
   this is a vestige of the times when cache manager loaded cache
*) set correct configuration file values while adding path
2011-08-29 10:07:58 +00:00
Igor Sysoev
34f579fb6d Merge of r3966, r3967, r3968, r3969, r3970, r3971:
Cache loader improvements:

The cache loader performs two tasks: inserting cache objects in inactivity
list and evaluating total cache size. Reading just directory is enough for
this purpose. Elimination of reading cache files saves at least one disk I/O
operation per file.
2011-08-29 09:51:56 +00:00
Igor Sysoev
283936abca Merge of r4035:
Cache size accounting fix: actual cache size on disk was less than
needed by sum of sizes of files loaded by worker processes themselves
while cache loader was running.

The bug has been introduced in r3900.
2011-08-29 09:35:00 +00:00
Igor Sysoev
32220608e5 Version bump. 2011-08-29 09:30:22 +00:00
Igor Sysoev
3b66b7d48c stable-1.0 branch 2011-07-19 14:57:06 +00:00
Igor Sysoev
7c4e29dcbe release-1.0.5 tag 2011-07-19 13:38:44 +00:00
Igor Sysoev
3763cfb559 nginx-1.0.5-RELEASE 2011-07-19 13:38:37 +00:00
Igor Sysoev
6c3c3bbe42 fix segfault if cache key is larger than upstream buffer size
patch by Lanshun Zhou
2011-07-19 11:24:16 +00:00
Igor Sysoev
82afb9cc86 $uid_reset 2011-07-19 11:21:50 +00:00
Igor Sysoev
a0202f26c6 fix r3756: release lock to allow other process to delete cache node
patch by Maxim Dounin
2011-07-19 10:35:02 +00:00
Igor Sysoev
99f2b9e063 fix building by MSVC 2011-07-18 15:00:05 +00:00
Igor Sysoev
87ee007022 revert r3935 and fix "stalled cache updating" alert
by freeing cache at upstream finalize phase
patch by Maxim Dounin
2011-06-28 13:26:08 +00:00
Igor Sysoev
f58154db2f referer_hash_max_size and referer_hash_bucket_size directives
patch by Witold Filipczyk
2011-06-28 10:40:44 +00:00
Igor Sysoev
8d7b1d222e use !aNULL to disable all anonymous cipher suites
patch by Rob Stradling
2011-06-27 15:47:51 +00:00
Igor Sysoev
0a860a1c1d bump version 2011-06-27 15:34:44 +00:00
Igor Sysoev
539aa3a1bf release-1.0.4 tag 2011-06-01 09:29:59 +00:00
Igor Sysoev
9201382188 nginx-1.0.4-RELEASE 2011-06-01 09:29:58 +00:00
Igor Sysoev
1788ec0c48 fix "stalled cache updating" alert,
when non-cachable HEAD response did not not free an expired cache node
2011-06-01 08:02:34 +00:00
Igor Sysoev
e9041dd12c concatenate auto/os/features and auto/unix 2011-05-31 08:25:10 +00:00
Igor Sysoev
e2fac245b6 delete unused auto/threads 2011-05-31 08:20:16 +00:00
Igor Sysoev
0462a613c1 Support POSIX semaphores on Linux.
This configure test must run before auto/make, because it adds library.
auto/unix was placed after auto/make just for historical reasons.

Patch by Denis F. Latypoff
2011-05-31 08:17:27 +00:00
Igor Sysoev
5343bf3221 revert r3875 since now map uses case sensetive regexes by default 2011-05-30 14:24:17 +00:00
Igor Sysoev
53d05b969b change ngx_http_map_find(): use case sensitive regexes 2011-05-30 12:36:17 +00:00
Igor Sysoev
36aadf7eba fix building on FreeBSD 6 or earlier against system md5 2011-05-27 13:30:53 +00:00
Igor Sysoev
e620fdac65 make built-in ngx_md5_update() interface consistent with other implemenations 2011-05-27 10:00:46 +00:00
Igor Sysoev
c4793b6505 fix building --without-http_auth_basic_module,
the bug has been introduced in r3923
2011-05-26 07:32:48 +00:00
Igor Sysoev
ce2229e2f7 bump version 2011-05-26 07:31:40 +00:00
Igor Sysoev
1417987fd6 release-1.0.3 tag 2011-05-25 14:55:11 +00:00
Igor Sysoev
f56cdb3a3c nginx-1.0.3-RELEASE 2011-05-25 14:50:50 +00:00