[ http://issues.apache.org/jira/browse/JAMES-700?page=comments#action_12450662 ] Joachim Draeger commented on JAMES-700: ---------------------------------------
IMAP actually has four states (pre auth, auth, selected, logout). In the selected state the client can rely on message number stability. The protocol assumes that client and server are in sync. At the moment the whole construct of server and backend is quite fragile. Exceptions may thrown for different reasons: bug in server/bug in backend/real IO problem or a misbehaving client. So we have to differentiate carefully the reason for the error. IMO the following makes sense: 1. Real IO error * the server is probably in big problems. No assumption can be made if and how the session can go on -> rest connection 2. Bug on the server side * No assumption can be made if the session is still valid and if client and server are still in sync -> rest connection 3. Misbehaving client. * we should be able to validate the client request before doing any actions -> send a BAD response 4. unsupported feature * we should be able to detect this before any action is taken -> send a BAD/NO response 5. the client requested something not existing (folder/messages) * the RFCs make proposals whether the action could be performed partial or should rejected completely -> send a corresponding response There are very likely still situations of 3.-5. that are not handled correctly, I consider them as bugs. Please don't hesitate to throw in your ideas/patches. It could be a nice thing to have "reset connection" configurable, and see how the clients react to it. The problem is that we have to see how the clients react and can't rely completely on RFCs. (There are a lot of "shoulds" ;-) > James resets connection when command throws RuntimeException > ------------------------------------------------------------ > > Key: JAMES-700 > URL: http://issues.apache.org/jira/browse/JAMES-700 > Project: James > Issue Type: Improvement > Components: IMAPServer > Reporter: Robert Burrell Donkin > Fix For: Trunk > > > I think that whenever a exception is thrown when processing an IMAP command > the socket connection is reset. This behaviour seems little less polite than > it needs to be. IMAP is stateless and IMHO errors should be returned within > the band. -- This message is automatically generated by JIRA. - If you think it was sent incorrectly contact one of the administrators: http://issues.apache.org/jira/secure/Administrators.jspa - For more information on JIRA, see: http://www.atlassian.com/software/jira --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
