port quic-go v0.60.0: fix QuarterStreamID field rename#501
Merged
Conversation
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.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Fixes #500.
quic-go v0.60.0 includes breaking changes in the
http3package. This PR does a full sync of all http3 changes from quic-go v0.59.0 → v0.60.0 into req's vendoredinternal/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:QuaterStreamID→QuarterStreamIDinDatagramCreatedandDatagramParsed(the compile error from 不兼容 quic-go v0.60.0 #500)decodeTrailersto passmaxHeaderBytesassizeLimitand use conditionalheaderFieldspointer forparseTrailersinternal/http3/headers.go:validateHeaderFieldNameAndValue,validateRegularHeaderField,validateTrailerHeaderFieldhelper functions (replaces inline validation logic)parseTrailers: addsizeLimitparameter with per-field size accounting anderrHeaderTooLargecheckvalidateTrailerHeaderFieldcheck inparseTrailersvalidExtendedConnectProtocolfunction (RFC 9220)strings.SplitSeqinextractAnnouncedTrailers:protocolpseudo headerinternal/http3/request_writer.go::protocolusingvalidExtendedConnectProtocolNot synced (not applicable to req's client-only vendored http3)
conn.goqloggerWG.Gorefactor — req removedqloggerWGWaitGroupserver.gowg.Gorefactor — req has no server logicresponse_writer.gochanges — req has noresponse_writer.goDependency + CI
github.com/quic-go/quic-gov0.59.0 → v0.60.0 ingo.modgodirective to1.25.0(quic-go v0.60.0 requires Go 1.25+, drops Go 1.24)1.24.x, 1.25.x→1.25.x, 1.26.xTesting
go build ./...passesgo 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.