Index: openacs-4/packages/acs-admin/www/test/signed-cookies-test-2.tcl =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/acs-admin/www/test/Attic/signed-cookies-test-2.tcl,v diff -u -r1.4 -r1.4.2.1 --- openacs-4/packages/acs-admin/www/test/signed-cookies-test-2.tcl 7 Aug 2017 23:47:45 -0000 1.4 +++ openacs-4/packages/acs-admin/www/test/signed-cookies-test-2.tcl 16 Dec 2019 17:14:37 -0000 1.4.2.1 @@ -35,7 +35,7 @@ set list_length [llength $list_of_names] -ReturnHeaders +util_return_headers ns_write " [ad_header "signed cookies tests"] Index: openacs-4/packages/acs-content-repository/tcl/revision-procs.tcl =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/acs-content-repository/tcl/revision-procs.tcl,v diff -u -r1.37 -r1.37.2.1 --- openacs-4/packages/acs-content-repository/tcl/revision-procs.tcl 11 Jun 2018 14:51:13 -0000 1.37 +++ openacs-4/packages/acs-content-repository/tcl/revision-procs.tcl 16 Dec 2019 17:14:38 -0000 1.37.2.1 @@ -127,7 +127,7 @@ ns_set put [ns_conn outputheaders] "Content-Length" $content_length - ReturnHeaders $mime_type $content_length + util_return_headers $mime_type $content_length # # In a HEAD request, just send headers and no content # Index: openacs-4/packages/acs-core-docs/www/eng-standards-filenaming.adp =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/acs-core-docs/www/eng-standards-filenaming.adp,v diff -u -r1.4.2.1 -r1.4.2.2 --- openacs-4/packages/acs-core-docs/www/eng-standards-filenaming.adp 2 Mar 2019 19:30:04 -0000 1.4.2.1 +++ openacs-4/packages/acs-core-docs/www/eng-standards-filenaming.adp 16 Dec 2019 17:14:38 -0000 1.4.2.2 @@ -202,7 +202,7 @@ [ad_footer]" doc_return 200 text/html $page_content -

The old convention was to call ReturnHeaders and then ns_write for each distinct chunk of the +

The old convention was to call util_return_headers and then ns_write for each distinct chunk of the page. This approach has the disadvantage of tying up a scarce and valuable resource (namely, a database handle) for an unpredictable amount of time while sending packets back to the browser, and so it Index: openacs-4/packages/acs-core-docs/www/xml/engineering-standards/filenaming.xml =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/acs-core-docs/www/xml/engineering-standards/filenaming.xml,v diff -u -r1.8 -r1.8.2.1 --- openacs-4/packages/acs-core-docs/www/xml/engineering-standards/filenaming.xml 7 Aug 2017 23:47:54 -0000 1.8 +++ openacs-4/packages/acs-core-docs/www/xml/engineering-standards/filenaming.xml 16 Dec 2019 17:14:38 -0000 1.8.2.1 @@ -409,7 +409,7 @@ -The old convention was to call ReturnHeaders and +The old convention was to call util_return_headers and then ns_write for each distinct chunk of the page. This approach has the disadvantage of tying up a scarce and valuable resource (namely, a database handle) for an unpredictable amount of 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.7 -r1.7.2.1 --- openacs-4/packages/acs-subsite/www/shared/1pixel.tcl 7 Aug 2017 23:47:59 -0000 1.7 +++ openacs-4/packages/acs-subsite/www/shared/1pixel.tcl 16 Dec 2019 17:14:38 -0000 1.7.2.1 @@ -12,7 +12,7 @@ b:integer } -ReturnHeaders "image/gif" +util_return_headers "image/gif" if { [catch { set file [open [acs_package_root_dir "acs-subsite"]/www/shared/1pixel.header] 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.81.2.3 -r1.81.2.4 --- openacs-4/packages/acs-tcl/tcl/defs-procs.tcl 1 Oct 2019 08:51:19 -0000 1.81.2.3 +++ openacs-4/packages/acs-tcl/tcl/defs-procs.tcl 16 Dec 2019 17:14:38 -0000 1.81.2.4 @@ -624,7 +624,7 @@ db_release_unused_handles ad_http_cache_control - ReturnHeaders + util_return_headers ns_write [ad_parse_template \ -params [list \ [list doc(title) $title] \ 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.189.2.44 -r1.189.2.45 --- openacs-4/packages/acs-tcl/tcl/utilities-procs.tcl 16 Dec 2019 17:01:50 -0000 1.189.2.44 +++ openacs-4/packages/acs-tcl/tcl/utilities-procs.tcl 16 Dec 2019 17:14:38 -0000 1.189.2.45 @@ -1519,7 +1519,23 @@ ns_write $entire_string_to_write } -ad_proc -private ReturnHeaders { +ad_proc -deprecated ReturnHeaders args { + 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 + bulk uploads, installs, etc.). + + It returns status 200 and all headers including + any added to outputheaders. + + DEPRECATED: does not comply with OpenACS naming convention. + + @see util_return_headers +} { + return [util_return_headers {*}$args] +} + +ad_proc -private util_return_headers { {content_type text/html} {content_length ""} } { @@ -1559,7 +1575,7 @@ Returns HTTP headers plus the top of the user-visible page. To be used with streaming HTML output } { - ReturnHeaders $content_type + util_return_headers $content_type if { $first_part_of_page ne "" } { ns_write $first_part_of_page } Index: openacs-4/packages/dotlrn/www/deregister.tcl =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/dotlrn/www/deregister.tcl,v diff -u -r1.14 -r1.14.2.1 --- openacs-4/packages/dotlrn/www/deregister.tcl 29 Jun 2018 17:27:19 -0000 1.14 +++ openacs-4/packages/dotlrn/www/deregister.tcl 16 Dec 2019 17:14:38 -0000 1.14.2.1 @@ -64,7 +64,7 @@ ad_script_abort } else { ns_log Error "deregister.tcl failed: $errmsg" - ReturnHeaders + util_return_headers ad_return_error "[_ dotlrn.lt_Error_removing_user_c]" "[_ dotlrn.lt_An_error_occurred_whil_1]" } } Index: openacs-4/packages/dotlrn/www/admin/community-members-add-to-community.tcl =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/dotlrn/www/admin/community-members-add-to-community.tcl,v diff -u -r1.9 -r1.9.2.1 --- openacs-4/packages/dotlrn/www/admin/community-members-add-to-community.tcl 29 Jun 2018 17:27:19 -0000 1.9 +++ openacs-4/packages/dotlrn/www/admin/community-members-add-to-community.tcl 16 Dec 2019 17:14:38 -0000 1.9.2.1 @@ -96,7 +96,7 @@ ad_returnredirect $referer } else { ns_log Error "community-members-add-to_community.tcl failed: $errmsg" - #ReturnHeaders + #util_return_headers ad_return_error "[_ dotlrn.lt_Error_adding_user_to_]" "[_ dotlrn.lt_An_error_occurred_whil]" } ad_script_abort Index: openacs-4/packages/survey/www/view-attachment.tcl =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/survey/www/view-attachment.tcl,v diff -u -r1.4 -r1.4.4.1 --- openacs-4/packages/survey/www/view-attachment.tcl 27 Oct 2014 16:41:56 -0000 1.4 +++ openacs-4/packages/survey/www/view-attachment.tcl 16 Dec 2019 17:14:38 -0000 1.4.4.1 @@ -26,7 +26,7 @@ } } -ReturnHeaders $file_type +util_return_headers $file_type cr_write_content -revision_id $revision_id Index: openacs-4/packages/survey/www/admin/responses-export.tcl =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/survey/www/admin/responses-export.tcl,v diff -u -r1.13 -r1.13.4.1 --- openacs-4/packages/survey/www/admin/responses-export.tcl 27 Jun 2015 20:46:16 -0000 1.13 +++ openacs-4/packages/survey/www/admin/responses-export.tcl 16 Dec 2019 17:14:38 -0000 1.13.4.1 @@ -77,7 +77,7 @@ set current_question_list [list] set csv_export "" set r 0 -ReturnHeaders "application/text" +util_return_headers "application/text" ns_write "$headline \r\n" db_foreach get_all_survey_question_responses "" {