fix(release): a release file's download leaves the token behind when Forgejo redirects it to R2 #16
No reviewers
Labels
No labels
area/build
area/install
area/saves
area/ui
area/updates
good first issue
gpu/amd
gpu/intel
gpu/nvidia
help wanted
kind
bug
kind
chore
kind
docs
kind
feature
kind
performance
kind
question
platform/linux
platform/steam-deck
platform/windows
priority
critical
priority
high
priority
low
status
blocked
status
confirmed
status
duplicate
status
invalid
status
needs-info
status
wontfix
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set
Reference
MagicBeanDev/LongshotLauncher!16
Loading…
Reference in a new issue
No description provided.
Delete branch "HumanBean/LongshotLauncher:fix/release-r2-redirect"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Why
Forgejo now keeps release files in Cloudflare R2: a release file's link answers 303 to a signed R2 link, and R2 refuses a request that also carries a token (HTTP 400).
release.py'sdownload()sends the job's token and urllib passes it on, so the tag path's check of the commit's nightly (released-as, which reads its SHA256SUMS and signature) fails, and the next rc or stable tag would stop at The version.What changed
scripts/release.py:download()opens with a redirect handler that dropsAuthorizationwhen a redirect leaves the host it was sent to; the forge still gets the token.tests/test_release.py: a forge stand-in that redirects to a store stand-in refusing a token. It fails on main (HTTP 400) and passes here.Checked live:
v3.0.0-rc.1/SHA256SUMSgives 200 through one redirect to R2 without a token, and 400 with one. Packages (/api/packages) are served directly, no change. The launcher (AllowAutoRedirect),setup.c(WinHTTP) and the Linux builder's downloads follow redirects and send no token.Flags and settings
None
Measurements
main:
232356eb(2026-11-13)this PR: fix/release-r2-redirect @
63820554232356eb63820554Testing
Tested:
tests/test_release.py(all pass; the new test fails on main's release.py); the live 200/400 above.Not tested: a tag run on the runner; the next rc tag shows it.
Needs other testers: None
Screenshots
Nothing on screen
Risk and rollback
A redirect within the forge keeps the token as before. Reverting the commit is enough.
Checklist
For everyone
type(scope): description).main.python -I -B tests/run_all.pyrun and passing (any failure that also fails onmainis named above).third_party/untouched (a new folder with aPROVENANCE.mdinstead).