bgdelivery proc returnfile (public)

 bgdelivery[i] returnfile [ -client_data client_data ] [ -delete delete ] \
    [ -content_disposition content_disposition ] status_code mime_type \
    filename

Defined in /var/www/openacs.org/packages/xotcl-core/tcl/bgdelivery-procs.tcl

Deliver the given file to the requester in the background. This proc uses the background delivery thread to send the file in an event-driven manner without blocking a request thread. This is especially important when large files are requested over slow connections. With NaviServer, this function is mostly obsolete, at least, when writer threads are configured. The writer threads have as well the advantage, that these can be used with https, while the bgdelivery thread works directly on the socket. One remaining purpose of this function is h264 streaming delivery (when the module is in use).

Switches:
-client_data (optional)
-delete (optional, defaults to "false")
-content_disposition (optional)
Parameters:
status_code (required)
mime_type (required)
filename (required)

Testcases:
No testcase defined.
[ show source ]
Show another procedure: