range requests for non-seekable streams

Fix for range requests for non-seekable streams.