jackrabbit-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Bertrand Delacretaz <bdelacre...@apache.org>
Subject Re: json API exception
Date Tue, 08 Apr 2014 07:57:17 GMT
On Tue, Apr 8, 2014 at 9:39 AM, Lukas Kahwe Smith <smith@pooteeweet.org> 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.


[1] http://docs.oracle.com/javaee/1.3/api/javax/servlet/ServletResponse.html

View raw message