summaryrefslogtreecommitdiff
path: root/email
diff options
context:
space:
mode:
Diffstat (limited to 'email')
-rw-r--r--email/utils.scm5
1 files changed, 3 insertions, 2 deletions
diff --git a/email/utils.scm b/email/utils.scm
index 2040b21..8344c6b 100644
--- a/email/utils.scm
+++ b/email/utils.scm
@@ -79,8 +79,9 @@ reached. If SEQUENCE is seen, unget it to PORT and return."
(else (put-u8 out octet)
(read-bytes-and-write-till in out sequence)))))
- (call-with-bytevector-output-port
- (cut read-bytes-and-write-till port <> sequence)))
+ (let ((bv (call-with-bytevector-output-port
+ (cut read-bytes-and-write-till port <> sequence))))
+ (if (bytevector=? bv (make-bytevector 0)) (eof-object) bv)))
(define (get-line-with-delimiter port)
"Read a line from PORT and return it as a string including the