comparison src/org/eclipse/jetty/server/Request.java @ 987:af8742d31bca

remove Server._attributes
author Franklin Schmidt <fschmidt@gmail.com>
date Mon, 17 Oct 2016 04:59:15 -0600
parents d35b0a3a7a4a
children 13beba0c127f
comparison
equal deleted inserted replaced
986:4f2d04c72781 987:af8742d31bca
253 maxFormKeys = _context.getContextHandler().getMaxFormKeys(); 253 maxFormKeys = _context.getContextHandler().getMaxFormKeys();
254 } 254 }
255 255
256 if (maxFormContentSize < 0) 256 if (maxFormContentSize < 0)
257 { 257 {
258 Object obj = _connection.getConnector().server.getAttribute("org.eclipse.jetty.server.Request.maxFormContentSize"); 258 maxFormContentSize = 200000;
259 if (obj == null)
260 maxFormContentSize = 200000;
261 else if (obj instanceof Number)
262 {
263 Number size = (Number)obj;
264 maxFormContentSize = size.intValue();
265 }
266 else if (obj instanceof String)
267 {
268 maxFormContentSize = Integer.valueOf((String)obj);
269 }
270 } 259 }
271 260
272 if (maxFormKeys < 0) 261 if (maxFormKeys < 0)
273 { 262 {
274 Object obj = _connection.getConnector().server.getAttribute("org.eclipse.jetty.server.Request.maxFormKeys"); 263 maxFormKeys = 1000;
275 if (obj == null)
276 maxFormKeys = 1000;
277 else if (obj instanceof Number)
278 {
279 Number keys = (Number)obj;
280 maxFormKeys = keys.intValue();
281 }
282 else if (obj instanceof String)
283 {
284 maxFormKeys = Integer.valueOf((String)obj);
285 }
286 } 264 }
287 265
288 if (content_length > maxFormContentSize && maxFormContentSize > 0) 266 if (content_length > maxFormContentSize && maxFormContentSize > 0)
289 { 267 {
290 throw new IllegalStateException("Form too large " + content_length + ">" + maxFormContentSize); 268 throw new IllegalStateException("Form too large " + content_length + ">" + maxFormContentSize);