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.27 -r1.28 --- openacs-4/packages/xotcl-core/tcl/bgdelivery-procs.tcl 12 Dec 2009 12:00:41 -0000 1.27 +++ openacs-4/packages/xotcl-core/tcl/bgdelivery-procs.tcl 12 Dec 2009 18:40:13 -0000 1.28 @@ -114,7 +114,8 @@ my end-delivery -client_data $client_data $filename $handle $channel [set $bytesVar] } else { set block [h264read $handle] - set len [string bytelength $block] + # one should not use "bytelength" on binary data: http://wiki.tcl.tk/8455 + set len [string length $block] incr $bytesVar $len h264Spooler incr byteCount $len if {[catch {puts -nonewline $channel $block} errorMsg]} { @@ -296,7 +297,7 @@ } set query [::xo::cc actual_query] set use_h264 [expr {[string match video/mp4* $mime_type] && $query ne "" - && ([string match "*start=*" $query] || [string match "*end=*" $query]) + && ([string match {*start=[1-9]*} $query] || [string match {*end=[1-9]*} $query]) && [info command h264open] ne ""}] if {$use_h264} {