We are using Restlet over Jetty, for some reason our default buffer size seems to be 262,144 bytes. We would like to set a custom value, but have been unable to figure out how.
1 Answers
You can configure the server connectors (the adapters for underlying transport layers) and configure them with parameters within their associated contexts. The supported set of parameters depends on the transport layers used.
In the case of Jetty, you can have a look at the page http://restlet.com/technical-resources/restlet-framework/javadocs/2.3/jse/ext/org/restlet/ext/jetty/JettyServerHelper.html to find out which are supported.
In your case, the parameter requestBufferSize
(version 2.1) would suit you. You can configure it as described below:
Component c = new Component();
Server server = c.getServers().add(Protocol.HTTP, 8182);
server.getContext().getParameters().add("requestBufferSize", 8*1024);
c.start();
With Restlet 2.3, I can't see anymore this parameter. It seems that only the response is configurable...
You could also have a look at this general page about connectors: http://restlet.com/technical-resources/restlet-framework/guide/2.3/core/base/connectors.
Hope it helps you, Thierry

- 198,364
- 44
- 396
- 360