114
115
// ClientSupported returns an error if client is unsupported, nil otherwise.
116
>
func (vc *versionChecker) ClientSupported(ctx context.Context) error {
version_checker.go
117
>
118
>
headers := GetValues(ctx, ClientNameHeaderName, ClientVersionHeaderName, SupportedServerVersionsHeaderName)
119
>
clientName := headers[0]
120
>
clientVersion := headers[1]
121
>
supportedServerVersions := headers[2]
122
>
123
>
// Validate client version only if it is provided and server knows about this client.
124
>
if clientName != "" && clientVersion != "" {
125
if supportedClientRange, ok := vc.supportedClientsRange[clientName]; ok {
126
clientVersionParsed, parseErr := semver.Parse(clientVersion)