• last updated 16 hours ago
Constraints
Constraints: committers
 
Constraints: files
Constraints: dates
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

- don't use "string bytelength" on binary datga

- match match-patterns more precise

- bgdelivery: added "Class FileSpooler" to ease to add common behavior

for "fileSpooler" and "h264Spooler"

- bgdelivery: provide same "end-delivery" interface for h264Spooler

- bgdelivery: added a pseudo streaming spooler for h264

  1. … 1 more file in changeset.
- make sure to use "connection: close" for requests delivered via bgdelivery thread

- add global variable reference

- make cleanup more robust

- fixing typos, seems if i need a vacation

adding cleanup handler for bgdelivery

- add client_data to ad_returnfile_background and supporting functions

- add object fileSpooler to ease customization

- handle special case, were file size == 0 bytes; fcopy behaves differently in this case

-update to version 0.100, compliant with xowiki 0.105

  1. … 24 more files in changeset.
add debug info in case, channel::transfer fails

- protect channel transfer by a mutex

- check in bg-delivery whether the driver is "nssock"; otherwise, fall back to classical ns_returnfile

- fix encoding in bg delivery spooler

- make code less verbose

  1. … 1 more file in changeset.
fix cvs conflict

  1. … 1 more file in changeset.
fix escaped file

fix for references clause

  1. … 2 more files in changeset.
cluster support for cr-cache and chat

  1. … 4 more files in changeset.