james-server-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From server-...@james.apache.org
Subject [jira] Created: (JAMES-328) TOP <msg> 0 does not return a terminator on error
Date Thu, 14 Oct 2004 21:33:51 GMT
Message:

  A new issue has been created in JIRA.

---------------------------------------------------------------------
View the issue:
  http://issues.apache.org/jira/browse/JAMES-328

Here is an overview of the issue:
---------------------------------------------------------------------
        Key: JAMES-328
    Summary: TOP <msg> 0 does not return a terminator on error
       Type: Bug

     Status: Unassigned
   Priority: Minor

    Project: James
 Components: 
             POP3Server
   Versions:
             2.2.0

   Assignee: 
   Reporter: John Glorioso

    Created: Thu, 14 Oct 2004 2:33 PM
    Updated: Thu, 14 Oct 2004 2:33 PM
Environment: James version 2.2.0 running on redhat 9, java version 1.4.2_03, mysql version
4.0.17 pc-linux-686

Description:
I first noticed the problem using Java mail version 1.3.1 attempting to retrieve a malformed
pop3 message from James. The message headers specify an invalid encoding type "Content-Transfer-Encoding:
plain". When the command "TOP <msg> 0" is issued, James returns "+OK Message follows",
then successfully returns all headers. Upon attempting to retrieve 0 lines of the message,
it apparently encounters an error with that invalid encoding type and returns "-ERR Error
while retrieving message." rather then the termination character of carriage return, period,
carriage return. Javamail chokes on this waiting for the period termination character as it
thinks that the "-ERR" text is a valid part of the message.

The "RETR" command works properly however and returns the message without error. Looking into
the source code for James, I found that even though the argument is to return 0 lines of the
message, James still attempts to write the message to the output with the call "mc.writeContentTo(nouts,
lines);" lines = 0 in this case and I put in a temporary work around to not do this unless
lines was > 0, but if a TOP command was issued with 5 for example, it would still return
the invalid response.

Not sure what the best solution is, but it needs to either return -ERR up front, or to return
the termination character regardless so that dumb mail clients can process it.


---------------------------------------------------------------------
JIRA INFORMATION:
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

If you want more information on JIRA, or have a bug to report see:
   http://www.atlassian.com/software/jira


---------------------------------------------------------------------
To unsubscribe, e-mail: server-dev-unsubscribe@james.apache.org
For additional commands, e-mail: server-dev-help@james.apache.org


Mime
View raw message