Index: openacs-4/packages/xotcl-core/tcl/bgdelivery-procs.tcl =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/xotcl-core/tcl/bgdelivery-procs.tcl,v diff -u -N -r1.68.2.15 -r1.68.2.16 --- openacs-4/packages/xotcl-core/tcl/bgdelivery-procs.tcl 2 Aug 2021 21:16:31 -0000 1.68.2.15 +++ openacs-4/packages/xotcl-core/tcl/bgdelivery-procs.tcl 12 Apr 2022 09:35:38 -0000 1.68.2.16 @@ -22,6 +22,7 @@ (when the module is in use). } { + security::csp::add_static_resource_header $mime_type ns_returnfile $status_code $mime_type $filename } @@ -41,6 +42,7 @@ blocking a request thread. This is especially important when large files are requested over slow (e.g. dial-ip) connections. } { + security::csp::add_static_resource_header $mime_type ns_returnfile $status_code $mime_type $filename } return @@ -686,7 +688,7 @@ set tid [:get_tid] # :log "+++ lock ${:bgmutex}" - ::thread::mutex lock ${:mutex} + ns_mutex_lock ${:mutex} # # Transfer the channel to the bgdelivery thread and report errors @@ -707,7 +709,7 @@ } } errorMsg - ::thread::mutex unlock ${:mutex} + ns_mutex_unlock ${:mutex} #ns_mutex unlock ${:bgmutex} # :log "+++ unlock ${:bgmutex}" @@ -791,6 +793,8 @@ everything to ns_returnfile. } { #ns_log notice "ad_returnfile_background xo::use_h264 -> [xo::use_h264 $mime_type]" + + security::csp::add_static_resource_header $mime_type if {[xo::use_h264 $mime_type]} { bgdelivery returnfile -client_data $client_data $status_code $mime_type $filename } else {