users@jersey.java.net

Disabling chunked encoding

From: Geoff Flarity <geoff.flarity_at_gmail.com>
Date: Tue, 14 Sep 2010 21:27:06 -0400

Hi,

I've been using Jersey to create simple JSONRPC control logic in various
daemons I've implemented. For the most part it's been great. However I've
run into a bit of a snag as one of the client libraries (python) doesn't
handle the chunked encoding properly. Since there's really no need for the
chunked encoding with this application I'd like to simply disable it.

Try as I might I can't find a way to do so. Here's the server code, the
JsonRpc class is just a simple dispatcher using annotations.

         ClassNamesResourceConfig r = new ClassNamesResourceConfig
(HttpJsonRpc.class);

        try {

            server = HttpServerFactory.create("http://0.0.0.0:"+port+"/",
r);

            server.start();

        } catch (java.io.IOException e) {

            logger.severe("error starting http json rpc server on port "
+port);

            throw new Error("error starting http json rpc server on
port "+port,
e);

        }

Is it possible to disable this? If so I'd appreciate any pointers in the
right direction.


Thanks,

Geoff