You are viewing a plain text version of this content. The canonical link for it is here.
Posted to server-dev@james.apache.org by no...@apache.org on 2009/10/12 15:17:53 UTC

svn commit: r824326 - /james/server/trunk/smtpserver-function/src/main/java/org/apache/james/smtpserver/core/SMTPCommandDispatcherLineHandler.java

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: server-dev-unsubscribe@james.apache.org
For additional commands, e-mail: server-dev-help@james.apache.org