Are you telling an HttpServletResponse how many bytes there are supposed to be in the response? The error sounds a bit like that might be a factor. Can't say I've seen a server exception about that before, usually it is the browser that gets confused if you use that feature and get it wrong.