Maxim Dounin [Thu, 18 Aug 2011 16:34:24 +0000 (16:34 +0000)]
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
Maxim Dounin [Thu, 18 Aug 2011 15:27:57 +0000 (15:27 +0000)]
Correctly set body if it's preread and there are extra data.
Previously all available data was used as body, resulting in garbage after
real body e.g. in case of pipelined requests. Make sure to use only as many
bytes as request's Content-Length specifies.
Maxim Dounin [Thu, 18 Aug 2011 15:10:23 +0000 (15:10 +0000)]
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.
Igor Sysoev [Thu, 4 Aug 2011 11:12:30 +0000 (11:12 +0000)]
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.
Igor Sysoev [Mon, 25 Jul 2011 09:45:00 +0000 (09:45 +0000)]
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
Igor Sysoev [Sun, 24 Jul 2011 16:47:31 +0000 (16:47 +0000)]
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.
Preparation for elimination of reading cache files by cache loader:
removing dependencies on the reading:
*) cache node valid_sec and valid_msec are used only for caching errors;
*) upstream buffer size can be used instead of cache node body_start.
Igor Sysoev [Fri, 22 Jul 2011 16:30:17 +0000 (16:30 +0000)]
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
Igor Sysoev [Fri, 22 Jul 2011 13:30:16 +0000 (13:30 +0000)]
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
Igor Sysoev [Wed, 20 Jul 2011 12:59:24 +0000 (12:59 +0000)]
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.
Igor Sysoev [Tue, 31 May 2011 08:17:27 +0000 (08:17 +0000)]
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.
Igor Sysoev [Sat, 23 Apr 2011 13:15:56 +0000 (13:15 +0000)]
fix r3822
Solaris strerror() invalid error code behaviour depends on version:
Solaris 10 returns "Unknown error" and sets errno to EINVAL,
Solaris 9 returns "Unknown error" and leaves errno intact,
Solaris 2 returns NULL.
Igor Sysoev [Fri, 22 Apr 2011 10:06:43 +0000 (10:06 +0000)]
Use more precise stat.st_blocks to account cache size on Unix
instead of file length rounded to a file system block size.
There is no similar way on Windows, so rounding to a cache->bsize is kept.