Don't crash generating the atom feed when there are no posts yet
This commit is contained in:
parent
eac799afc3
commit
1c0d0f2a85
2 changed files with 9 additions and 5 deletions
|
@ -278,7 +278,9 @@
|
||||||
(@ (xmlns "http://www.w3.org/2005/Atom") (xml:base ,(relurl "")))
|
(@ (xmlns "http://www.w3.org/2005/Atom") (xml:base ,(relurl "")))
|
||||||
(title (@ (type "text")) ,*title*)
|
(title (@ (type "text")) ,*title*)
|
||||||
(subtitle (@ (type "text")) ,*subtitle*)
|
(subtitle (@ (type "text")) ,*subtitle*)
|
||||||
(updated ,(timestamp->atom-date last-modified))
|
,@(if last-modified
|
||||||
|
`((updated ,(timestamp->atom-date last-modified)))
|
||||||
|
'())
|
||||||
(generator (@ (uri "http://wingolog.org/software/tekuti")
|
(generator (@ (uri "http://wingolog.org/software/tekuti")
|
||||||
(version "what"))
|
(version "what"))
|
||||||
"tekuti")
|
"tekuti")
|
||||||
|
|
|
@ -314,10 +314,12 @@
|
||||||
'status 304
|
'status 304
|
||||||
'doctype #f))
|
'doctype #f))
|
||||||
(else
|
(else
|
||||||
(rcons* (rpush 'output-headers (cons "Last-Modified"
|
(rcons* (if last-modified
|
||||||
(timestamp->rfc822-date
|
(rpush 'output-headers (cons "Last-Modified"
|
||||||
last-modified))
|
(timestamp->rfc822-date
|
||||||
request)
|
last-modified))
|
||||||
|
request)
|
||||||
|
request)
|
||||||
'doctype ""
|
'doctype ""
|
||||||
'content-type "application/atom+xml"
|
'content-type "application/atom+xml"
|
||||||
'sxml (append (atom-header server-name last-modified)
|
'sxml (append (atom-header server-name last-modified)
|
||||||
|
|
Loading…
Reference in a new issue