Fixing empty request data

This commit is contained in:
Jay McCarthy 2015-06-18 08:41:08 -04:00
parent 97827acba6
commit 33717eebaa

View File

@ -25,9 +25,13 @@
bs)) bs))
(define (->bytes str) (define (->bytes str)
(if (string? str) (cond
(string->bytes/utf-8 str) [(string? str)
str)) (string->bytes/utf-8 str)]
[(not str)
#""]
[else
str]))
(define (read-bytes-line/not-eof ip kind) (define (read-bytes-line/not-eof ip kind)
(define bs (read-bytes-line ip kind)) (define bs (read-bytes-line ip kind))