1
Fork 0
mirror of https://git.savannah.gnu.org/git/guile.git synced 2025-05-20 11:40:18 +02:00

web server: fix spurious warning

* module/web/server.scm (sanitize-response): Quick fix to the
  304-has-no-body sanitizer.
This commit is contained in:
Andy Wingo 2012-02-14 17:32:16 +01:00
parent 7cc8ef6235
commit eec3a50867

View file

@ -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?