You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Currently there is no elegant way to seek through data stream, except using range headers manually. So I purpose adding AsyncSeek, that would provide seek method on body reader. The seek method would fail if response contains Accept-Ranges: none. In other cases the reader would actually send new request with appropriate Range header.
On SeekFrom::Start(x) the range header should look like Range: bytes={x}-, so the reader can read till the end of stream normally.
For SeekFrom::Current(x) is similar to upper example: Range: bytes={c+x}-; where c is current stream position.
For SeekFrom::End(x) we just get the last x bytes: Range: bytes=-{x}.
The text was updated successfully, but these errors were encountered:
Currently there is no elegant way to seek through data stream, except using range headers manually. So I purpose adding
AsyncSeek
, that would provide seek method on body reader. The seek method would fail if response containsAccept-Ranges: none
. In other cases the reader would actually send new request with appropriateRange
header.On
SeekFrom::Start(x)
the range header should look likeRange: bytes={x}-
, so the reader can read till the end of stream normally.For
SeekFrom::Current(x)
is similar to upper example:Range: bytes={c+x}-
; where c is current stream position.For
SeekFrom::End(x)
we just get the last x bytes:Range: bytes=-{x}
.The text was updated successfully, but these errors were encountered: