You don't actually use the conn argument's value directly. Use ns_conn
to access the connection information. For example,
set url [ns_conn url]
gets you the URL of the HTTP request.
(a totally useless example, but you get the point).
/s.
On Nov 27, 2008, at 12:33 AM, Eric Lee wrote:
I'm trying to set up an ns_register_proc to redirect requests to
what used to be a separate website that now points to mine to a
directory on my site. (The client does not want to use a virtual
server.)
My plan is to test the host of the connection and ns_returnredirect
if it matches the formerly-separate host.
The docs at:
http://panoptic.com/wiki/aolserver/Ns_register_proc
say
"The conn argument will be filled automatically with the connection
information."
so I expected it to be an ns_set or array, but it does not seem to be.
It contains "cns0" on the first use after a server restart, then
"cns1", "cns2" on following uses.
Can someone give me a hint how to use the conn argument in:
ns_register_proc GET /* misaEast AAA BBB
proc misaEast { conn {arg1 one} {arg2 two} } {
...
}
I've also tried using [ns_conn host] within the proc but it just
returns "". Other ns_conn options, including url and location,
return the expected values. Is there a way around this?
Should what I am trying to do be done a different way?
Thank you,
Eric Lee
--
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.
--
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.