diff options
author | ianb <devnull@localhost> | 2007-04-19 22:40:09 +0000 |
---|---|---|
committer | ianb <devnull@localhost> | 2007-04-19 22:40:09 +0000 |
commit | 71848c27519d8f0df50de8526c7812d2bdf33509 (patch) | |
tree | 9fd95e24e02efb1614b441a2ef56ab164677baf5 /paste/httpheaders.py | |
parent | dbfc6fff608542c540ff8ec9511eb55ed7a787f5 (diff) | |
download | paste-71848c27519d8f0df50de8526c7812d2bdf33509.tar.gz |
Remove the languageRegEx check, as Kelly Yancey says that RFC 2616 does not actually require languages to be of that format (per http://kbyanc.blogspot.com/2007/04/more-i-dig-through-code-more-paste-is.html)
Diffstat (limited to 'paste/httpheaders.py')
-rw-r--r-- | paste/httpheaders.py | 4 |
1 files changed, 1 insertions, 3 deletions
diff --git a/paste/httpheaders.py b/paste/httpheaders.py index c07617b..8c21be9 100644 --- a/paste/httpheaders.py +++ b/paste/httpheaders.py @@ -941,7 +941,7 @@ class _AcceptLanguage(_MultiValueHeader): """ Accept-Language, RFC 2616 section 14.4 """ - languageRegEx = re.compile(r"^[a-z]{2}(-[a-z]{2})?$", re.I) + def parse(self, *args, **kwargs): """ Return a list of language tags sorted by their "q" values. For example, @@ -956,8 +956,6 @@ class _AcceptLanguage(_MultiValueHeader): for lang in langs: pieces = lang.split(";") lang, params = pieces[0].strip().lower(), pieces[1:] - if not self.languageRegEx.match(lang): - continue q = 1 for param in params: lvalue, rvalue = param.split("=") |