commons-issues mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Daniel Savarese (JIRA)" <j...@apache.org>
Subject [jira] [Commented] (NET-402) BufferedReader used for control channel, which does not follow the standard
Date Mon, 11 Apr 2011 04:49:05 GMT

    [ https://issues.apache.org/jira/browse/NET-402?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13018194#comment-13018194
] 

Daniel Savarese commented on NET-402:
-------------------------------------

I can't speak to IMAP, not having implemented it, but conforming NNTP and SMTP (and by extension,
POP3) implementations should not transmit bare CR or LF characters in protocol responses.
  A server reply that includes a bare CR or LF is non-conforming.  As soon as you assume a
server may be non-conforming, you have to decide which non-conforming cases to cater to. 
In many cases, it has been helpful to tolerate the non-conforming presence of a bare CR or
LF as a line terminator.  Unless there's a specific bug you can point to that argues fo tolerating
bare CR and LF the other way (i.e., interpret it as part of a command or data within a line),
I don't understand why these changes were made.

I'm not asking to revert change, but it would be nice to discuss stuff like this on the dev
mailing list first and come to a consensus on the approach instead of assuming it is a bug
as opposed to an intended behavior.

> BufferedReader used for control channel, which does not follow the standard
> ---------------------------------------------------------------------------
>
>                 Key: NET-402
>                 URL: https://issues.apache.org/jira/browse/NET-402
>             Project: Commons Net
>          Issue Type: Bug
>    Affects Versions: 2.2
>            Reporter: Sebb
>             Fix For: 3.0
>
>
> BufferedReader is used for wrapping the control channel, and uses its readLine() for
getting responses from the server.
> The IMAP, NNTP, POP3 and SMTP protocols require CRLF at the end of lines, but Bufferedreader#readLine()
also allows bare CR and LF terminators, which could potentially be included in a server reply.

--
This message is automatically generated by JIRA.
For more information on JIRA, see: http://www.atlassian.com/software/jira

Mime
View raw message