[Lisppaste-cvs] CVS update: lisppaste2/web-server.lisp

Brian Mastenbrook bmastenbrook at common-lisp.net
Wed Feb 4 01:18:39 UTC 2004


Update of /project/lisppaste/cvsroot/lisppaste2
In directory common-lisp.net:/tmp/cvs-serv19328

Modified Files:
	web-server.lisp 
Log Message:
MORE RSS!

Date: Tue Feb  3 20:18:38 2004
Author: bmastenbrook

Index: lisppaste2/web-server.lisp
diff -u lisppaste2/web-server.lisp:1.21 lisppaste2/web-server.lisp:1.22
--- lisppaste2/web-server.lisp:1.21	Tue Feb  3 18:47:26 2004
+++ lisppaste2/web-server.lisp	Tue Feb  3 20:18:38 2004
@@ -1,4 +1,4 @@
-;;;; $Id: web-server.lisp,v 1.21 2004/02/03 23:47:26 bmastenbrook Exp $
+;;;; $Id: web-server.lisp,v 1.22 2004/02/04 01:18:38 bmastenbrook Exp $
 ;;;; $Source: /project/lisppaste/cvsroot/lisppaste2/web-server.lisp,v $
 
 ;;;; See the LICENSE file for licensing information.
@@ -75,13 +75,16 @@
 		 (first-<-mod delta years months weeks days hours minutes seconds)
 		 (1- level)))))))
 
+(defun rss-link-header ()
+  `((link :rel "alternate" :type "application/rss+xml" :title "Lisppaste RSS" :href ,(araneida:urlstring *rss-url*))))
+
 (defmethod araneida:handle-request-response ((handler list-paste-handler) method request)
   (araneida:request-send-headers request :expires 0)
   (araneida:html-stream
    (araneida:request-stream request)
    `(html
      (head (title "All pastes")
-	   ((link :rel "alternate" :type "application/rss+xml" :title "Lisppaste RSS" :href ,(araneida:urlstring *rss-url*))))
+	   ,(rss-link-header))
      (body
       (center (h2 "All pastes in system"))
       ((table :width "100%" :cellpadding 2)
@@ -122,7 +125,8 @@
   (araneida:html-stream
    (araneida:request-stream request)
    `(html
-     (head (title ,(if annotate "Annotate" "Paste")))
+     (head (title ,(if annotate "Annotate" "Paste"))
+      ,(rss-link-header))
      (body
       (h1 ,(if annotate "Enter your annotation" "Enter your paste"))
       ((font :color red) (h2 ,message))
@@ -201,7 +205,8 @@
 	  (araneida:html-stream
 	   (araneida:request-stream request)
 	   `(html
-	     (head (title "Paste number " ,*paste-counter*))
+	     (head (title "Paste number " ,*paste-counter*)
+              ,(rss-link-header))
 	     (body
 	      (h1 "Pasted!")
 	      (p ,(if annotate "Your annotation should be available at " "Your paste should be available at ") ((a :href ,url) ,url) ", and was also sent to " ,channel " @ " ,(irc:server-name *connection*))
@@ -222,7 +227,8 @@
          (araneida:request-stream request)
          `(html
            (head
-            (title "Paste number " ,paste-number))
+            (title "Paste number " ,paste-number)
+            ,(rss-link-header))
            (body
             ((table :width "100%" :cellpadding 2)
 	     (tr ((td :align "left" :width "0%" :nowrap) "Paste number " ,paste-number ": ")
@@ -267,7 +273,8 @@
          (araneida:request-stream request)
          `(html
            (head
-            (title "Invalid paste number" ,paste-number))
+            (title "Invalid paste number" ,paste-number)
+            ,(rss-link-header))
            (body
             (h3 "No paste numbered " ,paste-number " could be found.")
 	    ,@(bottom-links)))))))





More information about the Lisppaste-cvs mailing list