Not able to understand this error

language: subtag “securid” is well-formed but unknown

var browserLocaleLanguageMatcher = language.NewMatcher([]language.Tag{
	// The first language in the list is used by default.

//GetLanguage ...
func (m *BrowserLanguageGetter) GetLanguage(req *http.Request) (lang string, err error) {
	acceptLanguage := req.Header.Get("Accept-Language")
	t, _, err := language.ParseAcceptLanguage(acceptLanguage)
	if err != nil {
		return "", errors.Wrap(err, "parse accept language")
	// Matches the best language , if not found then returns the first tag in matcher.
	tag, _, _ := browserLocaleLanguageMatcher.Match(t...)
	return tag.String(), nil

Accept-language in header = en-securid

Parser is not able to parse?

I think the error is quite clear. “Securid” is not a known locale where English is spoken.

1 Like

What country is securid supposed to be?

it’s a “smart invention” by RSA

When you install the web browser plug-in for Internet Explorer with the SecurID desktop application, the en-securid language setting, which allows the browser to recognize web pages protected by RSA SecurID, is added only for the local user who installs the application.

@sunnykarira you should filter out this “language” before parsing or ignore the parsing error for this one

1 Like

Thanks. I will serve english as default language incase we get broken or not acceptable “Accept-language” in header.

1 Like

This topic was automatically closed 90 days after the last reply. New replies are no longer allowed.