Index: openacs-4/packages/acs-subsite/www/shared/1pixel.tcl =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/acs-subsite/www/shared/1pixel.tcl,v diff -u -r1.3 -r1.4 --- openacs-4/packages/acs-subsite/www/shared/1pixel.tcl 17 May 2003 10:02:50 -0000 1.3 +++ openacs-4/packages/acs-subsite/www/shared/1pixel.tcl 26 Feb 2005 17:52:20 -0000 1.4 @@ -19,28 +19,20 @@ ns_writefp $file close $file - if { [util_aolserver_2_p] } { - if { $r == 0 } { set r 1 } - if { $g == 0 } { set g 1 } - if { $b == 0 } { set b 1 } + # Can't figure out how to write binary data using AOLserver 3 (it + # insist on UTF8-encoding it). So we write to a file, then dump + # the file's contents. - ns_write "[format "%c%c%c" $r $g $b]" - } else { - # Can't figure out how to write binary data using AOLserver 3 (it - # insist on UTF8-encoding it). So we write to a file, then dump - # the file's contents. + set file_name [ns_tmpnam] + ns_log "Notice" "logging to $file_name" + set file [open $file_name w+] + fconfigure $file -encoding binary -translation binary + puts -nonewline $file "[format "%c%c%c" $r $g $b]" + seek $file 0 + ns_writefp $file + close $file + ns_unlink $file_name - set file_name [ns_tmpnam] - ns_log "Notice" "logging to $file_name" - set file [open $file_name w+] - fconfigure $file -encoding binary - puts -nonewline $file "[format "%c%c%c" $r $g $b]" - seek $file 0 - ns_writefp $file - close $file - ns_unlink $file_name - } - set file [open "[acs_package_root_dir "acs-subsite"]/www/shared/1pixel.footer"] ns_writefp $file close $file