diff options
author | Andy Wingo | 2012-02-14 17:29:08 +0100 |
---|---|---|
committer | Andy Wingo | 2012-02-14 17:29:08 +0100 |
commit | 8034123827caa8ea3f080907faf28bb405f76417 (patch) | |
tree | 1368bbf6d610761a5eee3db37757f5b3ca4919d1 | |
parent | 82c7790016f0f08d369dbbd6a43660cad9128f94 (diff) | |
download | tekuti-8034123827caa8ea3f080907faf28bb405f76417.tar.gz tekuti-8034123827caa8ea3f080907faf28bb405f76417.zip |
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.
-rw-r--r-- | tekuti/page-helpers.scm | 9 |
1 files changed, 4 insertions, 5 deletions
diff --git a/tekuti/page-helpers.scm b/tekuti/page-helpers.scm index 15d5650..ab0a5e7 100644 --- a/tekuti/page-helpers.scm +++ b/tekuti/page-helpers.scm @@ -94,11 +94,10 @@ date (current-date) etag (if (string? etag) (cons etag #t) etag) extra-headers)) - (lambda (port) - (if sxml - (begin - (if doctype (display doctype port)) - (sxml->xml sxml port)))))) + (and sxml + (lambda (port) + (if doctype (display doctype port)) + (sxml->xml sxml port))))) (define (unparse-www-form-urlencoded alist) (string-join (map (lambda (pair) |