1
Fork 0
mirror of https://git.savannah.gnu.org/git/guile.git synced 2025-06-09 21:40:33 +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

@ -320,7 +320,7 @@
(bad-header-component 'quality str))))
(define (valid-quality? q)
(and (non-negative-integer? q) (<= 1000 q)))
(and (non-negative-integer? q) (<= q 1000)))
(define (write-quality q port)
(define (digit->char d)

View file

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