397130 maxFormContentSize set in jetty.xml is ignored
This commit is contained in:
parent
a4c547d61f
commit
3265c334cb
|
@ -255,13 +255,37 @@ public class Request implements HttpServletRequest
|
|||
maxFormContentSize = _context.getContextHandler().getMaxFormContentSize();
|
||||
maxFormKeys = _context.getContextHandler().getMaxFormKeys();
|
||||
}
|
||||
else
|
||||
|
||||
if (maxFormContentSize < 0)
|
||||
{
|
||||
Number size = (Number)_connection.getConnector().getServer()
|
||||
.getAttribute("org.eclipse.jetty.server.Request.maxFormContentSize");
|
||||
maxFormContentSize = size == null?200000:size.intValue();
|
||||
Number keys = (Number)_connection.getConnector().getServer().getAttribute("org.eclipse.jetty.server.Request.maxFormKeys");
|
||||
maxFormKeys = keys == null?1000:keys.intValue();
|
||||
Object obj = _connection.getConnector().getServer().getAttribute("org.eclipse.jetty.server.Request.maxFormContentSize");
|
||||
if (obj == null)
|
||||
maxFormContentSize = 200000;
|
||||
else if (obj instanceof Number)
|
||||
{
|
||||
Number size = (Number)obj;
|
||||
maxFormContentSize = size.intValue();
|
||||
}
|
||||
else if (obj instanceof String)
|
||||
{
|
||||
maxFormContentSize = Integer.valueOf((String)obj);
|
||||
}
|
||||
}
|
||||
|
||||
if (maxFormKeys < 0)
|
||||
{
|
||||
Object obj = _connection.getConnector().getServer().getAttribute("org.eclipse.jetty.server.Request.maxFormKeys");
|
||||
if (obj == null)
|
||||
maxFormKeys = 1000;
|
||||
else if (obj instanceof Number)
|
||||
{
|
||||
Number keys = (Number)obj;
|
||||
maxFormKeys = keys.intValue();
|
||||
}
|
||||
else if (obj instanceof String)
|
||||
{
|
||||
maxFormKeys = Integer.valueOf((String)obj);
|
||||
}
|
||||
}
|
||||
|
||||
if (content_length > maxFormContentSize && maxFormContentSize > 0)
|
||||
|
|
|
@ -129,8 +129,8 @@ public class ContextHandler extends ScopedHandler implements Attributes, Server.
|
|||
private EventListener[] _eventListeners;
|
||||
private Logger _logger;
|
||||
private boolean _allowNullPathInfo;
|
||||
private int _maxFormKeys = Integer.getInteger("org.eclipse.jetty.server.Request.maxFormKeys",1000).intValue();
|
||||
private int _maxFormContentSize = Integer.getInteger("org.eclipse.jetty.server.Request.maxFormContentSize",200000).intValue();
|
||||
private int _maxFormKeys = Integer.getInteger("org.eclipse.jetty.server.Request.maxFormKeys",-1).intValue();
|
||||
private int _maxFormContentSize = Integer.getInteger("org.eclipse.jetty.server.Request.maxFormContentSize",-1).intValue();
|
||||
private boolean _compactPath = false;
|
||||
private boolean _aliases = false;
|
||||
|
||||
|
|
Loading…
Reference in New Issue