@Override public Mutant body() throws Exception { long length = length(); if (length > 0) { MediaType type = type(); Config conf = require(Config.class); // TODO: sanitization of arguments File fbody = new File(conf.getString("application.tmpdir"), Integer.toHexString(System.identityHashCode(this))); files.add(fbody); int bufferSize = conf.getBytes("server.http.RequestBufferSize").intValue(); Parser.BodyReference body = new BodyReferenceImpl(length, charset(), fbody, req.in(), bufferSize); return new MutantImpl(require(ParserExecutor.class), type, body); } return new MutantImpl(require(ParserExecutor.class), type, new EmptyBodyReference()); }
@Override public Mutant body() throws Exception { long length = length(); if (length > 0) { MediaType type = type(); Config conf = require(Config.class); // TODO: sanitization of arguments File fbody = new File(conf.getString("application.tmpdir"), Integer.toHexString(System.identityHashCode(this))); files.add(fbody); int bufferSize = conf.getBytes("server.http.RequestBufferSize").intValue(); Parser.BodyReference body = new BodyReferenceImpl(length, charset(), fbody, req.in(), bufferSize); return new MutantImpl(require(ParserExecutor.class), type, body); } return new MutantImpl(require(ParserExecutor.class), type, new EmptyBodyReference()); }