On Tue, Apr 8, 2014 at 9:39 AM, Lukas Kahwe Smith <[email protected]> wrote: > ...ie. there is a bug both in our code as well as the error handling in > Jetty/Jackrabbit?...
IIUC either your code or Jackrabbit's is calling response.getWriter(), and later sendError -> WebdavResponseImpl.sendXmlResponse calls response.getOutputStream() and causes the issue, as per the servlet spec [1]. I have no idea if it's correct for WebdavResponseImpl to be involved and whether it's correct for it to use sendXmlResponse. I guess the best would be for such error handling code to be prepared to use either Writer or OutputStream, depending on what happened before. Unless something else (like a response object wrapper) guarantees that you cannot mix both. -Bertrand [1] http://docs.oracle.com/javaee/1.3/api/javax/servlet/ServletResponse.html
