1
Fork 0
mirror of https://git.savannah.gnu.org/git/guile.git synced 2025-06-24 12:20:20 +02:00

fix web server bugs

* module/web/http.scm (valid-quality?):
* module/web/server.scm (sanitize-response): Fix a couple bugs.
This commit is contained in:
Andy Wingo 2010-11-23 16:02:21 +01:00
parent a4342ba826
commit 612aa5bee8
2 changed files with 4 additions and 4 deletions

View file

@ -190,9 +190,9 @@
(values (let ((rlen (response-content-length response))
(blen (bytevector-length body)))
(cond
((rlen) (if (= rlen blen)
response
(error "bad content-length" rlen blen)))
(rlen (if (= rlen blen)
response
(error "bad content-length" rlen blen)))
((zero? blen) response)
(else (extend-response response 'content-length blen))))
body))