diff --git a/src/std/net/request.ss b/src/std/net/request.ss index 64fdcb8cf..4fb7749b3 100644 --- a/src/std/net/request.ss +++ b/src/std/net/request.ss @@ -384,12 +384,8 @@ (def (read/length length) (let* ((data (make-u8vector length)) - (rd (&BufferedReader-read reader data))) - (if (##fx< rd length) - (begin - (u8vector-shrink! data rd) - data) - data))) + (rd (&BufferedReader-read reader data 0 length length))) + data)) (def (read/end) (let (root [#f]) @@ -400,10 +396,6 @@ (cond ((##fxzero? rd) (u8vector-concatenate (cdr root))) - ((##fx< rd buflen) - (u8vector-shrink! buf rd) - (set! (cdr tl) [buf]) - (u8vector-concatenate (cdr root))) (else (let (tl* [buf]) (set! (cdr tl) tl*)