summaryrefslogtreecommitdiffhomepage
path: root/src (follow)
AgeCommit message (Collapse)AuthorFilesLines
2011-09-15Upstream: keepalive flag.Maxim Dounin2-1/+9
This patch introduces r->upstream->keepalive flag, which is set by protocol handlers if connection to upstream is in good state and can be kept alive.
2011-09-15Upstream: pipe length and input_filter_init in buffered mode.Maxim Dounin3-0/+39
As long as ngx_event_pipe() has more data read from upstream than specified in p->length it's passed to input filter even if buffer isn't yet full. This allows to process data with known length without relying on connection close to signal data end. By default p->length is set to -1 in upstream module, i.e. end of data is indicated by connection close. To set it from per-protocol handlers upstream input_filter_init() now called in buffered mode (as well as in unbuffered mode).
2011-09-15Upstream: r->upstream->length type change to off_t.Maxim Dounin3-13/+4
Previous use of size_t may cause wierd effects on 32bit platforms with certain big responses transferred in unbuffered mode. Nuke "if (size > u->length)" check as it's not usefull anyway (preread body data isn't subject to this check) and now requires additional check for u->length being positive.
2011-09-15Upstream: content_length_n API change.Maxim Dounin2-29/+28
We no longer use r->headers_out.content_length_n as a primary source of backend's response length. Instead we parse response length to u->headers_in.content_length_n and copy to r->headers_out.content_length_n when needed.
2011-09-15Upstream: separate pool for peer connections.Maxim Dounin1-1/+15
This is required to support persistent https connections as various ssl structures are allocated from connection's pool.
2011-09-15Workaround for cpu hog on errors with cached connections.Maxim Dounin1-0/+4
Just doing another connect isn't safe as peer.get() may expect peer.tries to be strictly positive (this is the case e.g. with round robin with multiple upstream servers). Increment peer.tries to at least avoid cpu hog in round robin balancer (with the patch alert will be seen instead). This is not enough to fully address the problem though, hence TODO. We should be able to inform balancer that the error wasn't considered fatal and it may make sense to retry the same peer.
2011-09-15API change: ngx_chain_update_chains() now requires pool.Maxim Dounin7-15/+18
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.
2011-09-15Buffers reuse in chunked filter.Maxim Dounin1-31/+68
There were 2 buffers allocated on each buffer chain sent through chunked filter (one buffer for chunk size, another one for trailing CRLF, about 120 bytes in total on 32-bit platforms). This resulted in large memory consumption with long-lived requests sending many buffer chains. Usual example of problematic scenario is streaming though proxy with proxy_buffering set to off. Introduced buffers reuse reduces memory consumption in the above problematic scenario. See here for initial report: http://mailman.nginx.org/pipermail/nginx/2010-April/019814.html
2011-09-15MP4 co64 atom support added.Igor Sysoev1-6/+164
2011-09-15Fix of struct field name.Igor Sysoev1-4/+4
2011-09-14Style fix.Igor Sysoev1-1/+2
2011-09-14Fixing building by gcc-4.7.Igor Sysoev1-3/+0
2011-09-14Version bump.Igor Sysoev2-3/+3
2011-09-14Fix of the previous commit: is_directio flag processing introduced in r4077Igor Sysoev1-0/+2
is still worthwhile.
2011-09-14Bugfix: open_file_cache did not update file info on retest.Igor Sysoev1-7/+1
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.
2011-09-14Skipping traks with unsupported media formats.Igor Sysoev1-14/+42
2011-09-14Fix of case when start sample does not reside on chunk boundary.Igor Sysoev1-67/+134
2011-09-13In Mac OS X Lion, Apple deprecated the use of the system OpenSSL libraryRuslan Ermilov1-0/+2
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-12Fix of debug message format.Igor Sysoev1-6/+6
2011-09-12Fix of codec debug message.Igor Sysoev1-1/+3
2011-09-12Fix of error message.Igor Sysoev1-2/+2
2011-09-12Fix of error message.Igor Sysoev1-1/+1
2011-09-12mp4_max_moov_size directive has been renamed to mp4_max_buffer_size.Igor Sysoev1-7/+7
2011-09-09bugfix of r4086: nginx could not be built without debug log.Igor Sysoev1-4/+4
2011-09-09Bugfix of r4086: directio was always enabled if mp4 file was sent as is.Igor Sysoev1-0/+3
2011-09-09ngx_http_mp4_moduleIgor Sysoev1-0/+2591
2011-09-05Bugfix: open_file_cache lost is_directio flag.Maxim Dounin3-0/+9
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.
2011-09-05Version bump.Igor Sysoev2-3/+3
2011-09-05Bugfix: read event was not blocked after reading body.Maxim Dounin1-0/+2
Read event should be blocked after reading body, else undefined behaviour might occur on additional client activity. This fixes segmentation faults observed with proxy_ignore_client_abort set.
2011-09-01Proper setting of read->eof in pipe code.Maxim Dounin1-1/+1
Setting read->eof to 0 seems to be just a typo. It appeared in nginx-0.0.1-2003-10-28-18:45:41 import (r164), while identical code in ngx_recv.c introduced in the same import do actually set read->eof to 1. Failure to set read->eof to 1 results in EOF not being generally detectable from connection flags. On the other hand, kqueue won't report any read events on such a connection since we use EV_CLEAR. This resulted in read timeouts if such connection was cached and used for another request.
2011-09-01Proper SSL shutdown handling.Maxim Dounin1-0/+5
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-01Now if client requests more ranges than "max_ranges" permits,Igor Sysoev1-2/+2
nginx disables ranges and returns just the source response.
2011-08-31The "max_ranges" directive.Igor Sysoev3-3/+26
"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.
2011-08-31Style fix: removal of tabs introduced in the previous commit.Igor Sysoev1-7/+7
2011-08-30*) fix of r4060: start value should be tested after the "found" label;Igor Sysoev1-13/+9
*) optimization: start value may be tested against end value only, since end value here may not be greater than content_length.
2011-08-30Unsatisfiable range with start value greater than content lengthIgor Sysoev1-5/+1
was not properly skipped. The bug has been introduced in r4057.
2011-08-30ngx_http_range_parse() should be static.Igor Sysoev1-2/+2
2011-08-30Ranges processing small optimization.Igor Sysoev1-8/+9
2011-08-30Now unsatisfiable ranges are processed according to RFC 2616.Igor Sysoev1-6/+8
2011-08-30Ranges processing small optimization.Igor Sysoev1-24/+15
2011-08-30Style fix.Igor Sysoev1-2/+2
2011-08-26Now if total size of all ranges is greater than source response size,Igor Sysoev1-12/+21
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.
2011-08-25Cache size accounting fix: actual cache size on disk was less thanIgor Sysoev1-0/+1
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-23Better handling of various per-server ssl options with SNI.Maxim Dounin1-0/+18
SSL_set_SSL_CTX() doesn't touch values cached within ssl connection structure, it only changes certificates (at least as of now, OpenSSL 1.0.0d and earlier). As a result settings like ssl_verify_client, ssl_verify_depth, ssl_prefer_server_ciphers are only configurable on per-socket basis while with SNI it should be possible to specify them different for two servers listening on the same socket. Workaround is to explicitly re-apply settings we care about from context to ssl connection in servername callback. Note that SSL_clear_options() is only available in OpenSSL 0.9.8m+. I.e. with older versions it is not possible to clear ssl_prefer_server_ciphers option if it's set in default server for a socket.
2011-08-23Version bump.Igor Sysoev2-3/+3
2011-08-22SIGWINCH/NOACCEPT signal is disabled now in non-daemon mode.Igor Sysoev1-2/+7
Non-daemon mode is currently used by supervisord, daemontools and so on or during debugging. The NOACCEPT signal is only used for online upgrade which is not supported when nginx is run under supervisord, etc., so this change should not break existant setups.
2011-08-22The change in adaptive loader behaviour introduced in r3975:Igor Sysoev1-40/+26
now cache loader processes either as many files as specified by loader_files or works no more than time specified by loader_threshold during each iteration. loader_threshold was previously used to decrease loader_files or to increase loader_timeout and this might eventually result in downgrading loader_files to 1 and increasing loader_timeout to large values causing loading cache for forever.
2011-08-22Fix buffer overrun under Windows.Maxim Dounin1-1/+2
2011-08-21Move SO_ACCEPTFILTER and TCP_DEFER_ACCEPT checks into configure.Maxim Dounin3-11/+1
NetBSD 5.0+ has SO_ACCEPTFILTER support merged from FreeBSD, and having accept filter check in FreeBSD-specific ngx_freebsd_config.h prevents it from being used on NetBSD. Therefore move the check into configure (and do the same for Linux-specific TCP_DEFER_ACCEPT, just to be in line).
2011-08-19Fix ignored headers handling in fastcgi/scgi/uwsgi.Maxim Dounin3-3/+27
The bug had appeared in r3561 (fastcgi), r3638 (scgi), r3567 (uwsgi).