[jboss-jira] [JBoss JIRA] Closed: (JBMAIL-245) getBoundary() in MessageData crashes if no Content-Type header is present

Andrew Oliver (JIRA) jira-events at jboss.com
Wed Dec 13 19:27:22 EST 2006


     [ http://jira.jboss.com/jira/browse/JBMAIL-245?page=all ]

Andrew Oliver closed JBMAIL-245.
--------------------------------

    Resolution: Won't Fix
      Assignee:     (was: Andrew Oliver)

> 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 ** Closed - moved to http://buni.org **
>          Issue Type: Bug
>      Security Level: Public(Everyone can see) 
>            Reporter: Pat Osterday
>
> 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