Skip to main content

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
[jetty-users] Preventing chunked encoding?


I'm using WriteListener to send data from a Jetty 9.2.9 based Servlet in a response. Chunked encoding must be prevented. To do so, the buffer size of the response is set to match the length of the data. This appears to work for smaller packets, but larger packets (larger dan 20-something kilobytes) cause chunked encoding to re-appear. How do I prevent this?

static class WriteListenerImpl implements WriteListener {

    private final AsyncContext context;
    private final byte[] data;

    public WriteListenerImpl(AsyncContext context, byte[] data) {
        this.context = context; = "">

    public void onWritePossible() throws IOException {

Kind regards,


Back to the top