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.
This commit is contained in:
2000-07-23 13:13:00 +00:00
parent 04c5a1dd1b
commit 1072ffaf5a

View File

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