Skip to content

port quic-go v0.60.0: fix QuarterStreamID field rename#501

Merged
imroc merged 3 commits into
masterfrom
fix/quic-go-v0.60.0-compat
Jul 2, 2026
Merged

port quic-go v0.60.0: fix QuarterStreamID field rename#501
imroc merged 3 commits into
masterfrom
fix/quic-go-v0.60.0-compat

Conversation

@imroc

@imroc imroc commented Jul 2, 2026

Copy link
Copy Markdown
Owner

Summary

Fixes #500.

quic-go v0.60.0 includes breaking changes in the http3 package. This PR does a full sync of all http3 changes from quic-go v0.59.0 → v0.60.0 into req's vendored internal/http3/ code, not just the field rename that caused the compile error.

Changes

Code sync from quic-go v0.60.0

internal/http3/conn.go:

  • Rename QuaterStreamIDQuarterStreamID in DatagramCreated and DatagramParsed (the compile error from 不兼容 quic-go v0.60.0 #500)
  • Update decodeTrailers to pass maxHeaderBytes as sizeLimit and use conditional headerFields pointer for parseTrailers

internal/http3/headers.go:

  • Extract validateHeaderFieldNameAndValue, validateRegularHeaderField, validateTrailerHeaderField helper functions (replaces inline validation logic)
  • parseTrailers: add sizeLimit parameter with per-field size accounting and errHeaderTooLarge check
  • Add validateTrailerHeaderField check in parseTrailers
  • Add validExtendedConnectProtocol function (RFC 9220)
  • Use strings.SplitSeq in extractAnnouncedTrailers
  • Add RFC 9220 comment on :protocol pseudo header

internal/http3/request_writer.go:

  • Validate extended CONNECT :protocol using validExtendedConnectProtocol

Not synced (not applicable to req's client-only vendored http3)

  • conn.go qloggerWG.Go refactor — req removed qloggerWG WaitGroup
  • server.go wg.Go refactor — req has no server logic
  • response_writer.go changes — req has no response_writer.go

Dependency + CI

  • Upgrade github.com/quic-go/quic-go v0.59.0 → v0.60.0 in go.mod
  • Bump go directive to 1.25.0 (quic-go v0.60.0 requires Go 1.25+, drops Go 1.24)
  • Update CI matrix: 1.24.x, 1.25.x1.25.x, 1.26.x

Testing

  • go build ./... passes
  • go test ./... passes (full suite, all packages OK)

Notes for reviewers

Users still on Go 1.24 will need to stay on the previous req release until they upgrade Go.

imroc added 3 commits July 2, 2026 12:02
quic-go v0.60.0 corrected the qlog field spelling from QuaterStreamID
to QuarterStreamID (PR #5590). Update internal/http3/conn.go to match.

Since quic-go v0.60.0 requires Go 1.25+, bump go.mod directive to
1.25.0 and update CI matrix to test 1.25.x and 1.26.x.

Fixes #500
Beyond the QuarterStreamID field rename, sync all other http3 changes
from quic-go v0.59.0 → v0.60.0:

headers.go:
- Extract validateHeaderFieldNameAndValue, validateRegularHeaderField,
  validateTrailerHeaderField helper functions
- parseTrailers: add sizeLimit parameter with per-field size accounting
  and errHeaderTooLarge check
- Add validateTrailerHeaderField check in parseTrailers
- Add validExtendedConnectProtocol function (RFC 9220)
- Use strings.SplitSeq in extractAnnouncedTrailers
- Add RFC 9220 comment on :protocol pseudo header

request_writer.go:
- Validate extended CONNECT :protocol using validExtendedConnectProtocol

conn.go:
- Update decodeTrailers to pass maxHeaderBytes as sizeLimit and use
  conditional headerFields pointer for parseTrailers

Not synced (not applicable to req's client-only vendored http3):
- conn.go qloggerWG.Go refactor (req removed qloggerWG WaitGroup)
- server.go wg.Go refactor (req has no server logic)
- response_writer.go changes (req has no response_writer.go)
Add explicit step-by-step process for syncing upstream changes
(quic-go / net/http / http2) to prevent incomplete syncs where only
the compile error is fixed but other upstream changes are missed.

Key addition: 'compilation passes ≠ sync complete' — must diff all
non-test files, sync each one, and explicitly document skipped items.
@imroc imroc merged commit 57c9644 into master Jul 2, 2026
3 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

不兼容 quic-go v0.60.0

1 participant