1
0
Fork 0

no sxml, no body

* tekuti/page-helpers.scm (respond): Give no body if there is no SXML.
  Fixes perhaps spurious errors raised by Guile's web server.
This commit is contained in:
Andy Wingo 2012-02-14 17:29:08 +01:00
parent 82c7790016
commit 8034123827

View file

@ -94,11 +94,10 @@
date (current-date) date (current-date)
etag (if (string? etag) (cons etag #t) etag) etag (if (string? etag) (cons etag #t) etag)
extra-headers)) extra-headers))
(and sxml
(lambda (port) (lambda (port)
(if sxml
(begin
(if doctype (display doctype port)) (if doctype (display doctype port))
(sxml->xml sxml port)))))) (sxml->xml sxml port)))))
(define (unparse-www-form-urlencoded alist) (define (unparse-www-form-urlencoded alist)
(string-join (map (lambda (pair) (string-join (map (lambda (pair)