You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
refactor(auth): move IsMalformedHeader from server to auth package
The isMalformedAuthHeader function implements RFC 7230 header validation
logic that belongs in the internal/auth package alongside other header
parsing utilities (ParseAuthHeader, ExtractSessionID, etc.).
Changes:
- Add exported auth.IsMalformedHeader to internal/auth/header.go
- Remove private isMalformedAuthHeader from internal/server/auth.go
- Update server/auth.go to call auth.IsMalformedHeader
- Update server/auth_test.go to call auth.IsMalformedHeader
- Add TestIsMalformedHeader with 12 cases to internal/auth/header_test.go
This makes all header validation logic discoverable in one place and
ensures future additions follow the same pattern.
Closes#4138 (partial: addresses Issue 3 from the analysis)
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
0 commit comments