fix(downloader): correct resume progress and avoid httpx private API
Two bugs found by code review: 1. Progress bar exceeds 100% on resumed downloads because Content-Length from a Range response covers only remaining bytes. Now adds resume_from for the true total. 2. session.transport reached into httpx.Client._transport, a private attribute that may break on httpx upgrades. Transport is now stored at construction time instead.
This commit is contained in:
1 parent
2466ef5fa8
commit
8acea390e6
4 files changed
+21
-5
No files matched your search
@@ -6,6 +6,13 @@ The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.1.0/),
|
||||
and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).
|
||||
|
||||
## [Unreleased]
|
||||
### Fixed
|
||||
|
||||
- **downloader:** Fix progress bar exceeding 100% on resumed downloads.
|
||||
`Content-Length` from a Range response covers only remaining bytes;
|
||||
now adds `resume_from` for the true total.
|
||||
- **session:** Stop reaching into `httpx.Client._transport` (private API).
|
||||
Transport reference is now stored at construction time.
|
||||
|
||||
### Added
|
||||
|
||||
|
||||
Reference in new issue
Block a user