Add per-download custom request headers; add “Advanced Settings” section to Add Download Sheet - #50
Add per-download custom request headers; add “Advanced Settings” section to Add Download Sheet#50QZGao wants to merge 6 commits into
Conversation
|
Rationale for settings placement: It would be a big cognitive burden for non-advanced users to see "Request Headers" settings. Therefore, I shelved it under a newly introduced “Advanced Settings” section. Rationale for warnings: A careful warning would let the users think twice when using custom Request Headers for torrented downloads; they should know that their Cookies/Authorizations (may very well contain real credentials!) in Headers will be broadcasted in this way. Still, we don't really want to actively scan the Headers for credentials, so other than a |
|
thanks for the pr. I'll be reviewing it. there's another big qol pr also in progress. giving that one priority first |
# Conflicts: # Harbor/Models/DownloadItem.swift # Harbor/Services/Aria2TorrentService.swift # Harbor/Services/DownloadCoordinator.swift # Harbor/ViewModels/DownloadCenter.swift # Harbor/Views/AddDownloadSheet.swift
# Conflicts: # Harbor/Views/AddDownloadSheet.swift
|
Merge conflicts are resolved. |
# Conflicts: # Harbor/Services/Aria2TorrentService.swift # Harbor/ViewModels/DownloadCenter.swift # Harbor/Views/AddDownloadSheet.swift # HarborTests/HarborModelAndSafetyTests.swift
|
Re-merged from the main branch, and also did some code quality cleanups. @thsnkhn now it is ready for your review. |
Closes #49.
Changelist
Add per-download custom request headers under the (NEW) collapsed "Advanced Settings" section.
Name: valuepair per line.U+0000–U+001F(exceptU+0009(TAB)) andU+007F(DEL).Pass headers to all possible download pipelines, including URLSession requests and aria2's torrent requests.
.torrentfiles with the supplied headers, including same-origin redirect handling and HTTP/empty-response validation.headeroption for torrent trackers and web seeds.Warn users before sending
CookieorAuthorizationheaders (may be credentials!) to torrent jobs, because broadcasting those to torrent sites may be a dangerous move.Explicitly reject custom headers for yt-dlp media downloads.
Verification: Built and tested locally.