Slight optimization of entity rendering.
This commit is contained in:
@ -72,9 +72,11 @@
|
||||
(setf (slot-value e 'content-length) (stream-entity-length e)))
|
||||
|
||||
(defmethod render-entity-body ((entity stream-entity-mixin) stream)
|
||||
(declare (type stream stream))
|
||||
(with-open-stream (in-stream (stream-entity-stream entity))
|
||||
(declare (type stream in-stream))
|
||||
(with-io-buffer (buffer)
|
||||
(loop for length = (read-sequence buffer in-stream)
|
||||
(loop for length of-type fixnum = (read-sequence buffer in-stream)
|
||||
until (zerop length)
|
||||
do
|
||||
(write-sequence buffer stream :end length)))))
|
||||
|
||||
Reference in New Issue
Block a user