Skip to content

fix: isolate request ID header configuration - #76

Open
Gav1nnn wants to merge 1 commit into
gin-contrib:masterfrom
Gav1nnn:fix/new-race
Open

fix: isolate request ID header configuration#76
Gav1nnn wants to merge 1 commit into
gin-contrib:masterfrom
Gav1nnn:fix/new-race

Conversation

@Gav1nnn

@Gav1nnn Gav1nnn commented Aug 20, 2026

Copy link
Copy Markdown

Summary

  • remove the package-level mutable request ID header configuration
  • keep each middleware instance header key isolated and make it available to Get through the current Gin context
  • add regression coverage for independent custom header keys and concurrent New calls

Testing

  • go test ./...
  • go test -race -count=10 ./...
  • go vet ./...
  • golangci-lint v2.12.0

Fixes #70

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.

New() creates a race condition if called with -race

1 participant