|
|
|
|
|
by jgrahamc
5360 days ago
|
|
It's an artefact of the way in which news.arc (actually srv.arc) uses functions for links. Here's the key code: (= dead-msg* "\nUnknown or expired link.")
(defop-raw x (str req)
(w/stdout str
(aif (fns* (sym (arg req "fnid")))
(it req)
(pr dead-msg*))))
If the fnid (function ID) isn't in the fns* list then you get the dead message. (def flink (f)
(string fnurl* "?fnid=" (fnid (fn (req) (prn) (f req)))))
In many places in the code closures are used to handle requests (see the flink code there). If the fns* list is cleared (say news.arc is restarted or harvest-fnids kills them) then you'll get the message.The use of closures in this manner means that the code needed to handle say a form submission is really compact and set up when the form itself is generated. |
|