Richard,

I am looking over the submission with an eye towards incorporating it.  The
only question I have is what to do in the event of invalid input.  You seem
to basically ignoring the error can keeping the data.  I'm thinking that
perhaps there ought to be an exception tossed that the handler can use to
report the invalid input (501 error).

Thoughts?

        --- Noel

-----Original Message-----
From: Richard O. Hammer [mailto:[EMAIL PROTECTED]
Sent: Wednesday, June 04, 2003 0:41
To: [EMAIL PROTECTED]
Subject: fix for bug 20370


I attach a new class, a line Reader, which I believe fixes the minor
bug (20370, CR or LF will improperly terminate SMTP command) which I
reported a few days ago.

This code can be incorporated, I believe, by replacing the following
line in SMTPHandler.handleConnection():
     inReader = new BufferedReader(new InputStreamReader(in, "ASCII"),
512);

with this line:
     inReader = new CRLF_TerminatedLineReader(in, "ASCII");

I have tested this class with an InputStream which included CR and LF
characters in the wrong places (not combined as CRLF at the end of
line).  It seems to behave as described in its Javadoc.

Rich Hammer


---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to