In package manager, while trying to load a package from a remote url, ad_return_top_of_page is used. The default for the content_type is "text/html". In this proc, [ns_startcontent -type $content_type] is called. In AOLserver 4.5, this is guaranteed to fail if there is not a charset spec like "text/html; charset=utf-8". As a quick fix, I have changed the default.
From acs-tcl/tcl/utilities-procs.tcl I made this change:
ad_proc -public ad_return_top_of_page {first_part_of_page {content_type "text/html; charset=utf-8"}} {
...
} {
set all_the_headers "HTTP/1.0 200 OK
MIME-Version: 1.0
Content-Type: $content_type\r\n"
util_WriteWithExtraOutputHeaders $all_the_headers
ns_startcontent -type $content_type
if { ![empty_string_p $first_part_of_page] } {
ns_write $first_part_of_page
}
}
However, this might be a bug in 4.5 to not return the default, outputcharset. This proc could look up the information itself, and/or ensure that there is a charset in the passed in value... and/or return an error prior to calling ns_startcontent which informs the user of the problem.
After that problem was fixed, I got an error on exec (child process exited abnormally). However there is no indication if the file was downloaded or what the error was. Many times exec'ed commands can write to stderr tricking catch into believing an error occured. Has anyone got this to work? Here is the command:
"exec [apm_gunzip_cmd] -q -c $file_path | [apm_tar_cmd] tf - 2>/dev/null"