diff of 2eadb2f00d45b6616dfd1291c9920e9891384504

2eadb2f00d45b6616dfd1291c9920e9891384504
diff --git a/src/rss/reader-db.lisp b/src/rss/reader-db.lisp
index 541dd0f..6a6924b 100644
--- a/src/rss/reader-db.lisp
+++ b/src/rss/reader-db.lisp
@@ -71,7 +71,8 @@ The second value returned is the last-modified response header as simpledate-tim
 		(not (stringp body)))
 	   (trivial-utf-8:utf-8-bytes-to-string body)
 	   body)
-       last-modified))))
+       last-modified
+       status))))
 
 ;; (setf drakma:*header-stream* *standard-output*)
 (defun get-child-item-value (name children)
@@ -128,21 +129,24 @@ The second value returned is the last-modified response header as simpledate-tim
 	 (url (gethash "url" feed))
 	 (feed-id (gethash "id" feed)))
     (log:info "Updating feed ~a~%" url)
-    (multiple-value-bind (feed-contents last-modified) (download url if-modified-since)
-      (let* ((feed-parsed (xmls:parse feed-contents))
-	     (feed-ns (xmls:node-ns feed-parsed)))
-
-	(log:info "did we get rss or atom?")
-	(if (and feed-ns
-		 (cl-ppcre:all-matches-as-strings "Atom" feed-ns))
-	    (let ((author (first (xmls:node-children
-				  (get-child-item-value "author" (xmls:node-children feed-parsed))))))
-	      (parse-atom author feed-id feed-parsed))
-	    (parse-rss feed-id feed-parsed))
-	(when last-modified
-	  (log:info "Updating ~a last-modified to ~a~%" feed-id last-modified)
-	  (update-last-modified feed-id last-modified)
-	  (log:info "Updated~%"))))))
+    (multiple-value-bind (feed-contents last-modified status) (download url if-modified-since)
+      (if (equalp status 200)
+	  (let* ((feed-parsed (xmls:parse feed-contents))
+		 (feed-ns (xmls:node-ns feed-parsed)))
+
+	    (log:info "did we get rss or atom?")
+	    (if (and feed-ns
+		     (cl-ppcre:all-matches-as-strings "Atom" feed-ns))
+		(let ((author (first (xmls:node-children
+				      (get-child-item-value "author" (xmls:node-children feed-parsed))))))
+		  (parse-atom author feed-id feed-parsed))
+		(parse-rss feed-id feed-parsed))
+	    (when last-modified
+	      (log:info "Updating ~a last-modified to ~a~%" feed-id last-modified)
+	      (update-last-modified feed-id last-modified)
+	      (log:info "Updated~%")))
+	  (log:warn "Received status ~d" status)))))
+      
 
 (defun current-hour ()
   (multiple-value-bind (second minute hour) (decode-universal-time (get-universal-time))