diff options
author | Andy Wingo <wingo@pobox.com> | 2012-02-14 17:32:16 +0100 |
---|---|---|
committer | Andy Wingo <wingo@pobox.com> | 2012-02-14 17:32:25 +0100 |
commit | eec3a50867086782a01286b742ee43f9fd47ecba (patch) | |
tree | 223624be580f4b7cdd4cba148f9054fc9a4fe99f | |
parent | 7cc8ef6235f65db9642ad95b83bf90d043d5395b (diff) | |
download | guile-eec3a50867086782a01286b742ee43f9fd47ecba.tar.gz |
web server: fix spurious warning
* module/web/server.scm (sanitize-response): Quick fix to the
304-has-no-body sanitizer.
-rw-r--r-- | module/web/server.scm | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/module/web/server.scm b/module/web/server.scm index 5fc081c16..42887e67f 100644 --- a/module/web/server.scm +++ b/module/web/server.scm @@ -264,7 +264,9 @@ on the procedure being called at any particular time." (call-with-encoded-output-string charset body)))) ((not (bytevector? body)) (error "unexpected body type")) - ((response-must-not-include-body? response) + ((and (response-must-not-include-body? response) + body + (not (zero? (bytevector-length body)))) (error "response with this status code must not include body" response)) (else ;; check length; assert type; add other required fields? |