aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorHugo Hörnquist <hugo@lysator.liu.se>2020-07-10 00:15:16 +0200
committerHugo Hörnquist <hugo@lysator.liu.se>2020-07-10 00:15:16 +0200
commitd319ede2ec62e26c9e755fa26310423e9f062b93 (patch)
treec369fe5e34ab95969a7669cff6bc984317bfea2e
parentAdd CSS to embedded icalendar. (diff)
downloadcalp-d319ede2ec62e26c9e755fa26310423e9f062b93.tar.gz
calp-d319ede2ec62e26c9e755fa26310423e9f062b93.tar.xz
Serve xml under .html, month view xhtml content-type.
-rw-r--r--module/entry-points/server.scm8
1 files changed, 3 insertions, 5 deletions
diff --git a/module/entry-points/server.scm b/module/entry-points/server.scm
index 398cda6b..6e038526 100644
--- a/module/entry-points/server.scm
+++ b/module/entry-points/server.scm
@@ -68,14 +68,12 @@
(return '((content-type text/html))
(sxml->html-string '(a (@ (href "/today")) "Gå till idag"))))
- (GET "/week/:start-date.:ext" (start-date ext)
+ (GET "/week/:start-date.html" (start-date)
(let* ((start-date
(start-of-week (parse-iso-date start-date)
(get-config 'week-start))))
- (return `((content-type ,(if (string=? ext "xml")
- 'application/xhtml+xml
- 'text/html)))
+ (return `((content-type application/xhtml+xml))
(with-output-to-string
(lambda ()
(html-generate calendars: (getf 'calendars)
@@ -91,7 +89,7 @@
(GET "/month/:start-date.html" (start-date)
(let* ((start-date (start-of-month (parse-iso-date start-date))))
- (return '((content-type text/html))
+ (return '((content-type application/xhtml+xml))
(with-output-to-string
(lambda ()
(html-generate calendars: (getf 'calendars)