users@grizzly.java.net

How to disable chunked encoding?

From: Andrea Gualano <andrea.gualano_at_imavis.com>
Date: Mon, 17 May 2010 17:55:16 +0200

Hi all,
how do I disable "Transfer-Encoding: chunked" for a single response (or
for an entire web server) without setting the Content-Length?

I need this to implement "multipart MJPEG" video streaming on top of
Grizzly. This is a quasi-standard way of streaming video which is
understood by most video players, but unfortunately some players do not
understand a chunked response when used in this context, still they put
"HTTP/1.1" in their requests.

I have tried to manually set chunkingDisabled = true in the
ServletAdapter constructor, but it seems to have no effect, i.e. without
Content-Length I still get chunked response.

I am using embedded GrizzlyWebServer with Comet; grizzly version is 1.9.18-k

Best regards,
Andrea

-- 
Andrea Gualano
ImaVis S.r.l.
email: andrea.gualano_at_imavis.com