[
https://issues.apache.org/jira/browse/MIME4J-90?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12654547#action_12654547
]
Markus Wiederkehr commented on MIME4J-90:
-----------------------------------------
Robert, please note that this method has always been throwing an
IllegalArgumentException up to and including release 0.4. We changed it to a
MimeException for 0.5 in MIME4J-73.
At the time I was not aware of the fact that
o.a.j.mime4j.parser.AbstractEntity#parseField already parses the header fields
before it passes them to a ContentHandler. It splits the header field into key
and value and checks if the key conforms to RFC 822. If this is not the case
the header field gets dropped entirely.
So the change to a MimeException was based on a false assumption. Changing it
back to the way it was should not cause big problems for the users of this
method.
> Consistent parsing of header field names
> ----------------------------------------
>
> Key: MIME4J-90
> URL: https://issues.apache.org/jira/browse/MIME4J-90
> Project: JAMES Mime4j
> Issue Type: Bug
> Affects Versions: 0.5
> Reporter: Markus Wiederkehr
> Priority: Minor
> Fix For: 0.6
>
> Attachments: mime4j-fieldname.patch
>
>
> RFC 822 defines a field as:
> field = field-name ":" [ field-body ] CRLF
> field-name = 1*<any CHAR, excluding CTLs, SPACE, and ":">
> This implies that a field name must consist of at least one character and may
> not contain spaces or tabs; not even trailing ones.
> Currently o.a.j.mime4j.parser.AbstractEntity#parseField accepts empty field
> names while o.a.j.mime4j.field.Field#parse accepts trailing spaces and tabs.
--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]