Issue #3681
updates from review Signed-off-by: Greg Wilkins <gregw@webtide.com>
This commit is contained in:
parent
4dc004cf96
commit
53dc425bde
|
@ -66,7 +66,7 @@ public class HttpFields implements Iterable<HttpField>
|
|||
*/
|
||||
public HttpFields()
|
||||
{
|
||||
this(16 ); // TODO tune default. Currently based on small same of Chrome requests.
|
||||
this(16); // TODO tune default. Currently based on small sample of Chrome requests.
|
||||
}
|
||||
|
||||
/**
|
||||
|
@ -116,7 +116,7 @@ public class HttpFields implements Iterable<HttpField>
|
|||
|
||||
public Stream<HttpField> stream()
|
||||
{
|
||||
return Arrays.stream(_fields).filter(f->f!=null);
|
||||
return Arrays.stream(_fields).limit(_size);
|
||||
}
|
||||
|
||||
/**
|
||||
|
|
|
@ -666,13 +666,11 @@ public class Request implements HttpServletRequest
|
|||
{
|
||||
if (_characterEncoding==null)
|
||||
{
|
||||
if (_contentType==null)
|
||||
getContentType();
|
||||
if (_contentType!=null)
|
||||
String contentType = getContentType();
|
||||
if (contentType!=null)
|
||||
{
|
||||
|
||||
MimeTypes.Type mime = MimeTypes.CACHE.get(_contentType);
|
||||
String charset = (mime == null || mime.getCharset() == null) ? MimeTypes.getCharsetFromContentType(_contentType) : mime.getCharset().toString();
|
||||
MimeTypes.Type mime = MimeTypes.CACHE.get(contentType);
|
||||
String charset = (mime == null || mime.getCharset() == null) ? MimeTypes.getCharsetFromContentType(contentType) : mime.getCharset().toString();
|
||||
if (charset != null)
|
||||
_characterEncoding=charset;
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue