• last updated 22 hours ago
Constraints
Constraints: committers
 
Constraints: files
Constraints: dates
- improve wrning message

Merging back to HEAD branch oacs-5-8 (using tag vg-merge-oacs-5-8-from-20141027).

  1. … 2547 more files in changeset.
- The C-library function tmpnam() is deprecated since a while. Therefore naviserver has deprecated ns_tmpnam as well.

Therefore we introduce a new function "ad_tmpnam" which requires just a minimal change and uses ns_mktemp.

  1. … 27 more files in changeset.
- change tabs into spaces

  1. … 22 more files in changeset.
- treat invalid byte ranges as described in rfc2616-sec14

- make it easier to track invalid provided ranges

- use "lassign" instead of multiple "lindex" instructions

- normalize string expressions

  1. … 13 more files in changeset.
- don't abbreviate subcommands

  1. … 22 more files in changeset.
- use tcl 8.5 extended index format for "string range"

  1. … 5 more files in changeset.
- fix cancellation of duplicate requests for same-named files (fix provided by Franz Penz and Andreas Mulley)

- use lassign instead of "foreach ... break" idiom

  1. … 21 more files in changeset.
- use new naviserver command ns_driversection if available to determine writer spooling

- bgdelivery-procs:

* refactor subscriber logic to avoid code duplication

* implement sweeper to check for stale connections

- chat-procs:

* call bgdelivery sweeper from chat sweeper

  1. … 1 more file in changeset.
- Added the changes mostly provided by Antonio Pisano to update the comet behavior for current browsers, which provide nowadays often more complete HTTP stacks.

  1. … 4 more files in changeset.
- fix parametrization of ns_writer for range requests

- changed comet output to chunked encoding

use lassign instead of lset

make sure to configure the channel to nonblocking before we close. A close to a blocking channel can block and can therefore block all spools and therefore potentially the full server.

Background: Tcl's fcopy sets a channel to non-blocking. In earlier Tcl versions, the channel was left in the non-blocking state, also after fcopy terminates (e.g. in error cases).

Newer Tcl versions seem to reestablish the earlier state, so we have to care now for the problem in bgdelivery.

- use naviserver writer thread if configured

Avoid potential attacks via too many open files.

Background: Tcl uses still select() for event processing, which has a pretty much hardcoded limit of max 1024 files (one has to recompile Tcl, libc, and maybe the kernel). With bgdelivery it is possible to deliver more than 1000 files simultaneously, but Tcl panics, when the number of descriptors is too large. We experienced the problem in a sitation, where the 1000+ requests were produced from a incorrect browser behavior (e.g. iPad issues a series of range requests rapidly without closing the last requests); bgdelivery allows now just one spooling request for a file from a user at one time.

- define global variable ::xo::naviserver for quick test, whether we are running under NaviServer

- fix ns_ur[en|de]code of "--" and "-charset" etc. This fixes the behavior of NaviServer, which has a "--" option terminator

  1. … 2 more files in changeset.
- add general backslash escape function ::xo::backslash_escape

- make sure to quote content disposition properly

- bump version number to 0.124

  1. … 2 more files in changeset.
- added async disk writer class

- bumped version number to 0.122

  1. … 1 more file in changeset.
- for delivering 0-byte files, set the length explicitely

- bgdelivery: added limited support for range requests (single range) as used by various HTML5 audio/video implementations

Removing previously added streamSpooler object. Used only in our local code.

Adding streamSpooler object. Which is useful for forwarding, in the background, a stream of data to a connection channel.

- added option "-delete true/false" to ad_proc returnfile to delete

optionally files after the delivery automatically

- added option "-content_disposition filename" to provide a filename

as content-disposition (disposition type: attachment)

- fix typo

- write HTTP headers for h264 streams in spooling thread to avoid

double executions of costly h264open