Index: openacs-4/packages/acs-tcl/tcl/defs-procs.tcl =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/acs-tcl/tcl/defs-procs.tcl,v diff -u -r1.62.2.3 -r1.62.2.4 --- openacs-4/packages/acs-tcl/tcl/defs-procs.tcl 19 Sep 2013 10:15:19 -0000 1.62.2.3 +++ openacs-4/packages/acs-tcl/tcl/defs-procs.tcl 28 Sep 2013 14:11:35 -0000 1.62.2.4 @@ -365,9 +365,9 @@ } ad_proc -public ad_return_string_as_file { - -string - -filename - -mime_type + -string:required + -filename:required + -mime_type:required } { Return a string as the content of a file @@ -376,8 +376,7 @@ @param mime_type Mime Type of the file being returned } { ns_set put [ns_conn outputheaders] "Content-Disposition" "attachment; filename=\"$filename\"" - ReturnHeaders "$mime_type" - ns_write $string + ns_return 200 $mime_type $string } ad_proc -public ad_return_complaint { 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.133.2.16 -r1.133.2.17 --- openacs-4/packages/acs-tcl/tcl/utilities-procs.tcl 27 Sep 2013 18:55:39 -0000 1.133.2.16 +++ openacs-4/packages/acs-tcl/tcl/utilities-procs.tcl 28 Sep 2013 14:11:35 -0000 1.133.2.17 @@ -1815,7 +1815,7 @@ ns_write $entire_string_to_write } -ad_proc -public ReturnHeaders {{content_type text/html}} { +ad_proc -private ReturnHeaders {{content_type text/html}} { We use this when we want to send out just the headers and then do incremental writes with ns_write. This way the user doesn't have to wait for streamed output (useful when doing @@ -1846,6 +1846,7 @@ ad_proc -public ad_return_top_of_page {first_part_of_page {content_type text/html}} { Returns HTTP headers plus the top of the user-visible page. + To be used with streaming HTML output } { ReturnHeaders $content_type if { $first_part_of_page ne "" } { @@ -2186,8 +2187,7 @@ Meta Refresh page instead of a redirect. } { - ReturnHeaders - ns_write " + ad_return_top_of_page "