2 new commits in galaxy-central: https://bitbucket.org/galaxy/galaxy-central/commits/25a0393e9112/ Changeset: 25a0393e9112 User: dan Date: 2013-07-19 19:40:39 Summary: Fix server error when an invalid locale is provided by a clients browser. Better handling of locales provided with surrounding whitespace. Affected #: 1 file diff -r a498340fed83e012e23f83f00d63b6ddaa5687cb -r 25a0393e91120b4e0fa79b868f5fafc8ea14843b lib/galaxy/web/framework/__init__.py --- a/lib/galaxy/web/framework/__init__.py +++ b/lib/galaxy/web/framework/__init__.py @@ -367,9 +367,9 @@ client_locales = self.environ['HTTP_ACCEPT_LANGUAGE'].split( ',' ) for locale in client_locales: try: - locales.append( Locale.parse( locale.split( ';' )[0], sep='-' ).language ) - except UnknownLocaleError: - pass + locales.append( Locale.parse( locale.split( ';' )[0].strip(), sep='-' ).language ) + except Exception, e: + log.debug( "Error parsing locale '%s'. %s: %s", locale, type( e ), e ) if not locales: # Default to English locales = 'en' https://bitbucket.org/galaxy/galaxy-central/commits/cd6fec2f5cba/ Changeset: cd6fec2f5cba Branch: stable User: dan Date: 2013-07-19 19:40:39 Summary: Fix server error when an invalid locale is provided by a clients browser. Better handling of locales provided with surrounding whitespace. Affected #: 1 file diff -r 9ebd7732e616492f4570587496f1b9074cb2eac7 -r cd6fec2f5cba878de9943dd00abe816a65dc96db lib/galaxy/web/framework/__init__.py --- a/lib/galaxy/web/framework/__init__.py +++ b/lib/galaxy/web/framework/__init__.py @@ -367,9 +367,9 @@ client_locales = self.environ['HTTP_ACCEPT_LANGUAGE'].split( ',' ) for locale in client_locales: try: - locales.append( Locale.parse( locale.split( ';' )[0], sep='-' ).language ) - except UnknownLocaleError: - pass + locales.append( Locale.parse( locale.split( ';' )[0].strip(), sep='-' ).language ) + except Exception, e: + log.debug( "Error parsing locale '%s'. %s: %s", locale, type( e ), e ) if not locales: # Default to English locales = 'en' Repository URL: https://bitbucket.org/galaxy/galaxy-central/ -- This is a commit notification from bitbucket.org. You are receiving this because you have the service enabled, addressing the recipient of this email.