Author: norman
Date: Mon Oct 12 13:17:53 2009
New Revision: 824326
URL: http://svn.apache.org/viewvc?rev=824326&view=rev
Log:
Do something useful if the line could not encoded
Modified:
james/server/trunk/smtpserver-function/src/main/java/org/apache/james/smtpserver/core/SMTPCommandDispatcherLineHandler.java
Modified:
james/server/trunk/smtpserver-function/src/main/java/org/apache/james/smtpserver/core/SMTPCommandDispatcherLineHandler.java
URL:
http://svn.apache.org/viewvc/james/server/trunk/smtpserver-function/src/main/java/org/apache/james/smtpserver/core/SMTPCommandDispatcherLineHandler.java?rev=824326&r1=824325&r2=824326&view=diff
==============================================================================
---
james/server/trunk/smtpserver-function/src/main/java/org/apache/james/smtpserver/core/SMTPCommandDispatcherLineHandler.java
(original)
+++
james/server/trunk/smtpserver-function/src/main/java/org/apache/james/smtpserver/core/SMTPCommandDispatcherLineHandler.java
Mon Oct 12 13:17:53 2009
@@ -98,8 +98,12 @@
}
} catch (UnsupportedEncodingException e) {
- // TODO Define what to do
- e.printStackTrace();
+ // This should never happen, anyway return a error message and
disconnect is prolly the best thing todo here
+ session.getLogger().error("Unable to parse line",e);
+ //end the session
+ SMTPResponse resp = new SMTPResponse(SMTPRetCode.LOCAL_ERROR,
"Unable to parse line.");
+ resp.setEndSession(true);
+ session.writeSMTPResponse(resp);
}
}
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]