From: Frank G. <fgr...@ma...> - 2003-11-17 15:09:17
|
Greg Wilkins wrote: > > Chunking is definitely the responsibility of the container and > the short answer to this is that Servlets should not do their own > chunking. > > The long answer is that it is not very clear what the container > should do when the servlet starts setting HTTP headers that it > think it is in control of. When a servlet sets such a header, is > this meant to say "I am chunking this response", or "I want you > to chunk this response for me". > > When you consider writers, filters, response wrappers, etc. > it is not a safe thing for a servlet to try and generate pre-chunked > content. > > Perhaps a Jetty handler could - if you really needed it, but we > would need to do some work for that also. > > If you are getting chunked content from somewhere else, then you can > use the ChunkingInputStream to dechunk it before writing it. Ugly > I know but I do know it works. Can you tell us more about your > requirments? I agree. There is no requirement here. I spoke with the code autor and he also agrees that the code should not be sending chunked data to the container, so we're just going to change the code and leave it at that. My purpose for posting here was just to get an informed opinion. Thanks for your help. |