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:
@ -343,7 +343,9 @@ used to call `reinitialize-instance'."))
|
|||||||
(stream (request-stream request)))
|
(stream (request-stream request)))
|
||||||
(when length
|
(when length
|
||||||
(let ((buffer (make-string 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
|
(make-instance 'string-entity :content-length length
|
||||||
:content-type (cdr (assoc "content-type" headers
|
:content-type (cdr (assoc "content-type" headers
|
||||||
:test #'string-equal))
|
:test #'string-equal))
|
||||||
|
|||||||
Reference in New Issue
Block a user