Hi Stefan,
Stefan Simik wrote: > > I looked at the uploads, but cannot find out, what exactly is the > problematic part with closing streams. > > I find one stream-closing code in FileUpload - #closeStreams() method. > This method closes all possibly opened InputStream-s for uploaded file. > Here, I don't see > any problem in gzipping HTML responses. > Could you please more elaborate on this - where the problem occurs ? I > would like to make > the HTML gzipping a bullet-proof solution ;) > I checked it more carefully. It goes like this: 1. When I call setResponsePage(Page page) Wicket checks it in PageRequestTarget.respond(RequestCycle requestCycle) 2. If there is, it calls requestCycle.redirectTo(page) 3. In redirectTo Wicket creates BufferedHttpServletResponse. 4. BufferedHttpServletResponse in method writeTo on line 553 close the stream: final OutputStream out = servletResponse.getOutputStream(); out.write(byteBuffer); out.close(); 5. GZIPFilter calls wrappedResponse.finishResponse() which try to close the stream again and throws Exception: public void close() throws IOException { if (closed) { throw new IOException("This output stream has already been closed"); } [...] } So the problem is in BufferedHttpServletResponse. I don't know if it is necessary? Thanks, Artur -- View this message in context: http://www.nabble.com/Gzipping-of-pages-%28HTML-output%2C-not-only-resources%29-tp16849900p17035947.html Sent from the Wicket - User mailing list archive at Nabble.com. --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]