Merge pull request #157 from izderadicka/naive_streaming_fix

Add spawn blocking to FileStream
This commit is contained in:
Igor Katson 2024-07-27 07:58:38 +01:00 committed by GitHub
commit 76083be286
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
3 changed files with 19 additions and 11 deletions

View file

@ -170,7 +170,7 @@ impl HttpApi {
let range_header = headers.get(http::header::RANGE);
trace!(torrent_id=idx, file_id=file_id, range=?range_header, "request for HTTP stream");
if let Some(range) = headers.get(http::header::RANGE) {
if let Some(range) = range_header {
let offset: Option<u64> = range
.to_str()
.ok()