1
0
Fork 0

Fix 304 edge case in atom feed

* tekuti/page.scm (atom-feed-from-posts): Don't bomb if the client sends
  a if-modified-since but we have no posts.
This commit is contained in:
Andy Wingo 2016-08-28 10:40:36 +02:00
parent cf10aa7056
commit 7643585d12

View file

@ -322,7 +322,7 @@
(post-timestamp (car posts)))))
(cond
((let ((since (request-if-modified-since request)))
(and since (>= (date->timestamp since) last-modified)))
(and since last-modified (>= (date->timestamp since) last-modified)))
(respond #f #:status 304
#:last-modified (timestamp->date last-modified)
#:etag (assq-ref index 'master)))