util_WriteWithExtraOutputHeaders (private)

 util_WriteWithExtraOutputHeaders headers_so_far [ first_part_of_page ]

Defined in packages/acs-tcl/tcl/utilities-procs.tcl

Takes in a string of headers to write to an HTTP connection, terminated by a newline. Checks \[ad_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).

Parameters:
headers_so_far (required)
first_part_of_page (optional)

Partial Call Graph (max 5 caller/called nodes):
%3 util_return_headers util_return_headers (public) util_WriteWithExtraOutputHeaders util_WriteWithExtraOutputHeaders util_return_headers->util_WriteWithExtraOutputHeaders ad_conn ad_conn (public) util_WriteWithExtraOutputHeaders->ad_conn

Testcases:
No testcase defined.
Source code:
    set headers [ad_conn outputheaders]
    ns_set put $headers Server "[ns_info name]/[ns_info version]"
    foreach {key value} [ns_set array $headers] {
        append headers_so_far "$key: $value\r\n"
    }
    append entire_string_to_write $headers_so_far "\r\n" $first_part_of_page
    ns_write $entire_string_to_write
XQL Not present:
PostgreSQL, Oracle
Generic XQL file:
packages/acs-tcl/tcl/utilities-procs.xql

[ hide source ] | [ make this the default ]
Show another procedure: