Index: openacs-4/packages/acs-tcl/tcl/utilities-procs.tcl =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/acs-tcl/tcl/utilities-procs.tcl,v diff -u -r1.100 -r1.101 --- openacs-4/packages/acs-tcl/tcl/utilities-procs.tcl 25 Sep 2007 15:22:38 -0000 1.100 +++ openacs-4/packages/acs-tcl/tcl/utilities-procs.tcl 12 Oct 2007 07:21:49 -0000 1.101 @@ -1723,15 +1723,16 @@ It returns status 200 and all headers including any added to outputheaders. } { + + if {[string match "text/*" $content_type] && ![string match *charset=* $content_type]} { + append content_type "; charset=[ns_config ns/parameters OutputCharset iso-8859-1]" + } + set all_the_headers "HTTP/1.0 200 OK MIME-Version: 1.0 Content-Type: $content_type\r\n" util_WriteWithExtraOutputHeaders $all_the_headers - if {[string match "text/*" $content_type]} { - if {![string match *charset=* $content_type]} { - append content_type \ - "; charset=[ns_config ns/parameters OutputCharset iso-8859-1]" - } + if {[string match "text/*" $content_type]} { ns_startcontent -type $content_type } else { ns_startcontent