[jboss-jira] [JBoss JIRA] Created: (JBMAIL-245) getBoundary() in MessageData crashes if no Content-Type header is present
Pat Osterday (JIRA)
jira-events at jboss.com
Fri Jul 28 17:25:11 EDT 2006
getBoundary() in MessageData crashes if no Content-Type header is present
-------------------------------------------------------------------------
Key: JBMAIL-245
URL: http://jira.jboss.com/jira/browse/JBMAIL-245
Project: JBoss Mail
Issue Type: Bug
Security Level: Public (Everyone can see)
Reporter: Pat Osterday
Assigned To: Andrew Oliver
In the getBoundary() method in MessageData, I think the line:
String[] header = getHeader("Content-Type").split("\\r\\n");
Should be moved into the try/catch. If a message doesn't have a Content-Type, the method crashes.
Not sure how the writeMessage in CmdRETR in the pop3 handlers would handle this, but I'm using similar code to read messages via a servlet and this issue just popped up for us.
Another option would be something like this in the beginning of the method:
String ctHeader = getHeader("Content-Type");
String[] header = null;
if (ctHeader != null) {
header = ctHeader.split("\\r\\n");
} else {
return null;
}
--
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: http://jira.jboss.com/jira/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira
More information about the jboss-jira
mailing list