407491 Better handle empty Accept-Language

This commit is contained in:
Greg Wilkins 2013-05-09 15:00:27 +10:00
parent 4dcc9b39fc
commit 50021c7ce4
1 changed files with 5 additions and 2 deletions

View File

@ -510,8 +510,11 @@ public class HttpFields implements Iterable<HttpField>
while (e.hasMoreElements())
{
String value = e.nextElement();
tok = new QuotedStringTokenizer(value, separators, false, false);
if (tok.hasMoreElements()) return true;
if (value!=null)
{
tok = new QuotedStringTokenizer(value, separators, false, false);
if (tok.hasMoreElements()) return true;
}
}
tok = null;
return false;