[bknr-cvs] ksprotte changed trunk/projects/bos/web/poi-handlers.lisp

BKNR Commits bknr at bknr.net
Wed Jul 16 13:30:21 UTC 2008


Revision: 3465
Author: ksprotte
URL: http://bknr.net/trac/changeset/3465

added timestamp for poi-xml-handler

U   trunk/projects/bos/web/poi-handlers.lisp

Modified: trunk/projects/bos/web/poi-handlers.lisp
===================================================================
--- trunk/projects/bos/web/poi-handlers.lisp	2008-07-16 13:24:40 UTC (rev 3464)
+++ trunk/projects/bos/web/poi-handlers.lisp	2008-07-16 13:30:21 UTC (rev 3465)
@@ -562,9 +562,13 @@
 
 
 (defmethod handle-object ((handler poi-xml-handler) poi)
-  (with-query-params ((lang "en"))
-    (with-xml-response (:xsl-stylesheet-name "/static/poi.xsl")
-      (write-poi-xml poi lang))))
+  (let ((timestamp (store-object-last-change poi 1)))
+    (hunchentoot:handle-if-modified-since timestamp)  
+    (setf (hunchentoot:header-out :last-modified)
+          (hunchentoot:rfc-1123-date timestamp))
+    (with-query-params ((lang "en"))
+      (with-xml-response (:xsl-stylesheet-name "/static/poi.xsl")
+        (write-poi-xml poi lang)))))
 
 (defclass poi-kml-handler (object-handler)
   ()




More information about the Bknr-cvs mailing list