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
-**MultipartFormData**: `encodedData()` now returns `Data?` (no force unwrap); UTF-8 encoding failures return `nil`. Name and filename in Content-Disposition are escaped (quotes and backslashes). New error `NetworkError.invalidMultipartEncoding` when encoding fails.
13
17
-**Path normalization**: Request path is normalized (trim slashes, collapse `//`); paths containing `..` are rejected with `NetworkError.invalidURL`.
14
18
-**NonRetriableError**: New protocol; default `RetryPolicy.shouldRetry` returns `false` for errors conforming to `NonRetriableError` (replaces string-based type name checks).
15
19
-**Task cancellation**: Retry loop checks `Task.isCancelled` and calls `Task.checkCancellation()`; on cancellation throws `CancellationError`.
16
20
-**Logging**: Path and error messages in logs use `privacy: .private` to avoid leaking sensitive data.
17
21
-**Convenience init**: `NetworkManager(baseURL: URL, ...)` convenience initializer for fixed base URL.
18
22
-**Shared progress session**: New `ProgressSessionManager` with a single shared `URLSession` and delegate for progress requests; progress requests no longer create a new session per request.
19
-
-**Tests**: 10 new tests in `CoverageImprovementsTests.swift` (convenience init, path validation, multipart escaping, NonRetriableError, Task cancellation, etc.). Total **125 tests**, coverage **99.13%** (ProgressSessionManager excluded from coverage like ProgressDelegate).
23
+
-**Tests**: Extended test suite (`CoverageImprovementsTests`, `ExtendedTestSuite`), progress and conflicting body tests. Total **156 tests**, coverage **99.13%** (ProgressDelegate/ProgressSessionManager excluded from report).
20
24
21
25
### Changed
22
26
-**RetryPolicy**: Default `shouldRetry` uses `NonRetriableError` protocol instead of `String(describing: type(of:))`. Custom error types that should not be retried should conform to `NonRetriableError`.
23
27
-**MultipartFormData.encodedData()**: Return type is now `Data?`; callers (e.g. `NetworkManager`) throw `NetworkError.invalidMultipartEncoding` when `nil`.
28
+
-**File headers**: Unified Swift file headers (Created by, Copyright from file metadata).
0 commit comments