Hi all
this is happening to me with Naviserver on Windows with OpenACS 590. This is code that used work on AOLserver with an earlier version of OpenACS. Renaming and over-loading ns_return isn't working for me.
I have the put the following code in a package -init.tcl and restarted Naviserver.
ns_log Notice "BRIAN BRIAN info commands=[info commands ns_return]"
rename ns_return acs_return
ns_log Notice "BRIAN BRIAN acs_return info commands=[info commands acs_return], AND [info procs acs_return] PLUS commands=[info commands ns_return], AND [info procs ns_return]"
ns_log Notice "BRIAN BRIAN 1namespace which =[namespace which acs_return], AND [namespace which ns_return]"
proc ns_return { status mime_type content } {
ns_log Notice "BRIAN BRIAN 2namespace which =[namespace which acs_return], AND [namespace which ns_return]"
acs_return $status $mime_type $content
}
ns_log Notice "BRIAN BRIAN 3 body =[info body ns_return] AND [namespace which ns_return]"
The error log has the following output after restarting and trying to access a page:
[07/Apr/2017:09:27:34][3288.1764][-main-] Notice: BRIAN BRIAN info commands=ns_return
[07/Apr/2017:09:27:34][3288.1764][-main-] Notice: BRIAN BRIAN acs_return info commands=acs_return, AND PLUS commands=, AND
[07/Apr/2017:09:27:34][3288.1764][-main-] Notice: BRIAN BRIAN 1namespace which =::acs_return, AND
[07/Apr/2017:09:27:34][3288.1764][-main-] Notice: BRIAN BRIAN 3 body =
ns_log Notice "BRIAN BRIAN 2namespace which =[namespace which acs_return], AND [namespace which ns_return]"
acs_return $status $mime_type $content
AND ::ns_return
[07/Apr/2017:09:29:15][3288.14c4][-conn:openacs:0-] Notice: BRIAN BRIAN 2namespace which =, AND ::ns_return
[07/Apr/2017:09:29:15][3288.14c4][-conn:openacs:0-] Notice: BRIAN BRIAN 2namespace which =, AND ::ns_return
[07/Apr/2017:09:29:15][3288.14c4][-conn:openacs:0-] Error: GET /register/, PeerAddress: 127.0.0.1
invalid command name "acs_return"
while executing
"acs_return $status $mime_type $content"
(procedure "ns_return" line 3)
invoked from within
"ns_return 500 text/html $rendered_page"
(procedure "::nsf::procs::rp_report_error" line 42)
invoked from within
"rp_report_error"
(procedure "rp_handler" line 147)
invoked from within
"rp_handler"
while executing callback
ns:tclrequest rp_handler
(context: request proc)
What is interesting is that the "BRIAN BRIAN 3" and the "BRIAN BRIAN 2namespace" log entries indicates that the overload seems to have worked during server start, but then later it fails when it can no longer find acs_return.
I have tried using the :: namespace but get the same result.
Any suggestions?
thanks
Brian