Hi all!
I'm using aolserver 4.0.1 with tcl 8.4.5.
Running this simple code in an adp page:
ns_respond -status 505 -string "internal error"
the server crash (connection thread crash, you can see [defunct] process
with ps). Adding -type "text/plain" all is ok.
Reading the code the problem is in a nested call done by
Ns_ConnReturnCharData(conn, status, string, length, type). The "type"
parameter is NULL and it is checked with strlen! (in function
Ns_StrCaseFind). So this parameter type should be checked before the
Ns_ConnReturnCharData.
I can suggest a trivial solution.
Insert an if block at row 294, at showed into the following code:
/*
* We'll be returning a string now.
*/
if (type == NULL) {
type = "text/plain";
}
retval = Ns_ConnReturnCharData(conn, status, string, length, type);
Another little error is into the content of the error message when you
are not specifying -string, -file, -fileid. In this case the error message is
"must specify al least one of -string, -file or -type"
This message should be:
"must specify al least one of -string, -file or -fileid"
Thanks for help and pointers
Sorry for my poor english
Alberto Marchesini
--
AOLserver - http://www.aolserver.com/
To Remove yourself from this list, simply send an email to <[EMAIL PROTECTED]> with the
body of "SIGNOFF AOLSERVER" in the email message. You can leave the Subject: field of
your email blank.