util_WriteWithExtraOutputHeaders

one of the documented procedures in this installation of the ACS
Usage:
util_WriteWithExtraOutputHeaders   headers_so_far   { first_part_of_page "" }
What it does:
Takes in a string of headers to write to an HTTP connection, terminated by a newline. Checks [ns_conn outputheaders] and adds those headers if appropriate. Adds two newlines at the end and writes out to the connection. May optionally be used to write the first part of the page as well (saves a packet)
Defined in: /web/philip/packages/acs-core/utilities-procs.tcl

Source code:


    set set_headers_i 0
    set set_headers_limit [ns_set size [ns_conn outputheaders]]
    while {$set_headers_i < $set_headers_limit} {
	append headers_so_far "[ns_set key [ns_conn outputheaders] $set_headers_i]: [ns_set value [ns_conn outputheaders] $set_headers_i]\n"
	incr set_headers_i
    }
    append entire_string_to_write $headers_so_far "\n" $first_part_of_page
    ns_write $entire_string_to_write


philg@mit.edu