Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Some search engine bots seem to send strange accept locales #138

Closed
sabberworm opened this issue Oct 15, 2012 · 0 comments
Closed

Some search engine bots seem to send strange accept locales #138

sabberworm opened this issue Oct 15, 2012 · 0 comments

Comments

@sabberworm
Copy link
Member

               [0] => zh-CN
               [1] => zh-Hans;0.95
               [2] => zh-SG;0.95
               [3] => zh-HK;0.85
               [4] => zh-TW;0.85
               [5] => zh-MO;0.85
               [6] => zh-Hant;0.85
               [7] => zh;0.8
               [8] => en-us;0.55
               [9] => en-gb;0.55
               [10] => en;q=0.5
               [11] => *;q=0.3

Don’t let this fool LocaleUtil::acceptLocales.

sabberworm added a commit that referenced this issue Oct 15, 2012
Some search engine bot came with these accept languages:

                   [0] => zh-CN
                   [1] => zh-Hans;0.95
                   [2] => zh-SG;0.95
                   [3] => zh-HK;0.85
                   [4] => zh-TW;0.85
                   [5] => zh-MO;0.85
                   [6] => zh-Hant;0.85
                   [7] => zh;0.8
                   [8] => en-us;0.55
                   [9] => en-gb;0.55
                   [10] => en;q=0.5
                   [11] => *;q=0.3

I decided to ignore the values entirely for these mal-formatted values (defaulting to 1).

Closes #138 as fixed.

This change may be merged back to the 1.0 branch
sabberworm added a commit that referenced this issue Oct 15, 2012
Some search engine bot came with these accept languages:

                   [0] => zh-CN
                   [1] => zh-Hans;0.95
                   [2] => zh-SG;0.95
                   [3] => zh-HK;0.85
                   [4] => zh-TW;0.85
                   [5] => zh-MO;0.85
                   [6] => zh-Hant;0.85
                   [7] => zh;0.8
                   [8] => en-us;0.55
                   [9] => en-gb;0.55
                   [10] => en;q=0.5
                   [11] => *;q=0.3

I decided to ignore the values entirely for these mal-formatted values (defaulting to 1).

Closes #138 as fixed.

This change may be merged back to the 1.0 branch
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant