Skip to content

Commit 5786b3c

Browse files
Copilotlpcox
andcommitted
Improve version validation with whitespace check
- Use strings.TrimSpace in SetClientGatewayVersion to prevent whitespace-only versions - Addresses code review feedback Co-authored-by: lpcox <15877973+lpcox@users.noreply.github.com>
1 parent 68dbe67 commit 5786b3c

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

internal/mcp/connection.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@ var gatewayVersion = "dev"
2727

2828
// SetClientGatewayVersion sets the gateway version for MCP client implementation reporting
2929
func SetClientGatewayVersion(version string) {
30-
if version != "" {
30+
if strings.TrimSpace(version) != "" {
3131
gatewayVersion = version
3232
}
3333
}

0 commit comments

Comments
 (0)