Upstream Sync Report 2026-09-02: Transport.CancelRequest becomes a no-op
Nobody has claimed this yet.
- Dominant language
- Go
- Stars
- 4.9k
- Forks
- 409
- Avg merge
- 6h 47m
- Merged PRs (30d)
- 7
Description
Upstream Change
Go stdlib commit a0f3b6a (2026-08-31):
net/http: make Transport.CancelRequest into a no-op
Fixes golang/go#79040.
Affected Code
req inlines src/net/http/transport.go as root transport.go, which still contains the legacy cancellation machinery:
Transport.reqMu/Transport.reqCancelerfieldsprepareTransportCancel(registers every in-flight request in a per-Transport map)Transport.CancelRequestimplementationroundTripwiring that installs the wrapper cancel func
What the upstream change does
- Removes
reqMu/reqCancelerandprepareTransportCancel - Turns the deprecated
Transport.CancelRequestinto a no-op - Drops the per-request mutex + map bookkeeping from the
roundTriphot path
Impact
- Behavior change: after syncing, the deprecated
Transport.CancelRequeststops working. Users should migrate to context cancellation (NewRequestWithContext), which req already supports. - Minor performance benefit: no per-request registration under
reqMu. - Not a security fix.
Other commits since the last baseline (no impact)
0d6e66cnet/http/internal/http2: per-Server error channel pool — server.go is not inlined by reqef00dcfhttputil/reverseproxy: preserve original header on 1xx — reverseproxy is not inlinedf50b1aanet/http: enable more HTTP/3 tests — test-only56fb6d1net/http: return non-nil Response from ClientConn ping requests — clientconn.go bridge is not inlined (req uses its own legacy ClientConn)
Suggested action
Sync a0f3b6a into root transport.go (keeping req customizations) via the usual merge upstream net/http procedure.
Contributor guide
No contributing guide indexed for this repository
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start by comparing root transport.go with Go stdlib commit a0f3b6a and review the usual “merge upstream net/http” procedure. Inspect req’s customizations around Transport.reqMu, Transport.reqCanceler, prepareTransportCancel, CancelRequest, and roundTrip. Done means the upstream cancellation changes are synced without losing req customizations, with context cancellation still supported and CancelRequest becoming a no-op.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- go
- Domain
- backend, networking
- Issue type
- Refactor
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Active
- Clarity
- Clearly specified
- Newbie friendliness
- 52/100