Jeff Rogers wrote:

proc decode_url { why } {
     set page [ns_adp_parse -file /www/website/template.adp]
     ns_return 200 "text/html" "$page"
     ns_adp_exception state
     ns_log notice "adp exception state is $state"
     catch {ns_adp_return}
     return filter_return
}

Whoops, this won't work. The ns_adp_return will let the adp interpreter run *after* the next eval, but the next time just exits. (an additional piece of debugging code was hiding this from me initially)

I think a better approach (lacking "ns_adp_ctl reset") is

proc decode_url { why } {
   set page [ns_adp_parse -file /www/website/template.adp]
   ns_return 200 "text/html" "$page"
   ns_adp_exception state
   ns_log notice "adp exception state is $state"

   # reset the adp state
   set dn [open /dev/null w]
   ns_adp_ctl chan $dn
   catch { ns_adp_ctl chan "" }
   close $dn

   return filter_return
 }

Of course, I had to dig around in the code a bit to figure out how to call NsAdpReset, but on the plus side the AOLserver code is much more pleasant to dig around in than many other programs.

-J


--
AOLserver - http://www.aolserver.com/

To Remove yourself from this list, simply send an email to 
<lists...@listserv.aol.com> with the
body of "SIGNOFF AOLSERVER" in the email message. You can leave the Subject: 
field of your email blank.

Reply via email to