From 1072ffaf5a2de4b40d4388aebcf3edef4cef814e Mon Sep 17 00:00:00 2001 From: "Pierre R. Mai" Date: Sun, 23 Jul 2000 13:13:00 +0000 Subject: [PATCH] Small change that guards against flushable read-sequence in earlier versions of CMU CL, as well as guarding against short reads by read-sequence on socket streams, though my understanding of the standard seems to imply that read-sequence can only return prematurely on EOF. But this way we shouldn't have any problems either way. --- src/main/messages.cl | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/main/messages.cl b/src/main/messages.cl index 7609e88..7b3874c 100644 --- a/src/main/messages.cl +++ b/src/main/messages.cl @@ -343,7 +343,9 @@ used to call `reinitialize-instance'.")) (stream (request-stream request))) (when length (let ((buffer (make-string length))) - (read-sequence buffer stream) + (do ((start 0)) + ((>= (incf start (read-sequence buffer stream :start start)) + length))) (make-instance 'string-entity :content-length length :content-type (cdr (assoc "content-type" headers :test #'string-equal))