You are viewing a plain text version of this content. The canonical link for it is here.
Posted to mime4j-dev@james.apache.org by "Attila Király (JIRA)" <mi...@james.apache.org> on 2009/04/13 21:25:15 UTC
[jira] Created: (MIME4J-128) Make o.a.j.m.message.Message and
o.a.j.m.parser.MimeStreamParser be able to do headless parsing by using
o.a.j.m.parser.MimeTokenStream.parseHeadless
Make o.a.j.m.message.Message and o.a.j.m.parser.MimeStreamParser be able to do headless parsing by using o.a.j.m.parser.MimeTokenStream.parseHeadless
-----------------------------------------------------------------------------------------------------------------------------------------------------
Key: MIME4J-128
URL: https://issues.apache.org/jira/browse/MIME4J-128
Project: JAMES Mime4j
Issue Type: New Feature
Affects Versions: 0.6
Environment: Mime4j 0.6, Http Servlet
Reporter: Attila Király
Attachments: message_headless_parse.patch
parser.MimeTokenStream has a method called parseHeadless which makes it possible to parse MIME messages without header (which is the case for example in a web application with an incoming http request). This function is however not available in higher level apis of Mime4j like in parser.MimeStreamParser and message.Message. It would be nice to use it trough Message because so other functions of mime4j would be available, like the temporary storage.
I made a small patch that makes it possible to configure and use message.Message and parser.MimeStreamParser so it will do a headless parse. The patch only adds functionality it does not modify the current behaviour of the classes.
The patch contains modifications for message.Message (adding 2 new constructors) and parser.MimeStreamParser (adding a new function parseHeadless) and a test case for the headless parsing.
--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.
Re: [jira] Commented: (MIME4J-128) Make o.a.j.m.message.Message and
o.a.j.m.parser.MimeStreamParser be able to do headless parsing by using
o.a.j.m.parser.MimeTokenStream.parseHeadless
Posted by Markus Wiederkehr <ma...@gmail.com>.
Now that you mentioned it Robert, maybe the StorageProvider parameter
should have also gone into MimeEntityConfig instead. Would it be worth
to change that?
And another small idea: MimeEntityConfig could "return this" in all
setters to make it easier to modify several properties at once..
Markus
On Sat, Apr 18, 2009 at 8:48 PM, Markus Wiederkehr (JIRA)
<mi...@james.apache.org> wrote:
>
> [ https://issues.apache.org/jira/browse/MIME4J-128?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12700526#action_12700526 ]
>
> Markus Wiederkehr commented on MIME4J-128:
> ------------------------------------------
>
> The patch looks good but like Robert suggested I would prefer an additional property in MimeEntityConfig instead of adding another constructor.
>
>> Make o.a.j.m.message.Message and o.a.j.m.parser.MimeStreamParser be able to do headless parsing by using o.a.j.m.parser.MimeTokenStream.parseHeadless
>> -----------------------------------------------------------------------------------------------------------------------------------------------------
>>
>> Key: MIME4J-128
>> URL: https://issues.apache.org/jira/browse/MIME4J-128
>> Project: JAMES Mime4j
>> Issue Type: New Feature
>> Affects Versions: 0.6
>> Environment: Mime4j 0.6, Http Servlet
>> Reporter: Attila Király
>> Assignee: Robert Burrell Donkin
>> Fix For: 0.7
>>
>> Attachments: message_headless_parse.patch
>>
>>
>> parser.MimeTokenStream has a method called parseHeadless which makes it possible to parse MIME messages without header (which is the case for example in a web application with an incoming http request). This function is however not available in higher level apis of Mime4j like in parser.MimeStreamParser and message.Message. It would be nice to use it trough Message because so other functions of mime4j would be available, like the temporary storage.
>> I made a small patch that makes it possible to configure and use message.Message and parser.MimeStreamParser so it will do a headless parse. The patch only adds functionality it does not modify the current behaviour of the classes.
>> The patch contains modifications for message.Message (adding 2 new constructors) and parser.MimeStreamParser (adding a new function parseHeadless) and a test case for the headless parsing.
>
> --
> This message is automatically generated by JIRA.
> -
> You can reply to this email to add a comment to the issue online.
>
>
[jira] Commented: (MIME4J-128) Make o.a.j.m.message.Message and
o.a.j.m.parser.MimeStreamParser be able to do headless parsing by using
o.a.j.m.parser.MimeTokenStream.parseHeadless
Posted by "Robert Burrell Donkin (JIRA)" <mi...@james.apache.org>.
[ https://issues.apache.org/jira/browse/MIME4J-128?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12699784#action_12699784 ]
Robert Burrell Donkin commented on MIME4J-128:
----------------------------------------------
This seems like a reasonable request. Need to take a more detailed look at the patch before I'm convinced it's the right approach.
Any general objections to adding this feature?
> Make o.a.j.m.message.Message and o.a.j.m.parser.MimeStreamParser be able to do headless parsing by using o.a.j.m.parser.MimeTokenStream.parseHeadless
> -----------------------------------------------------------------------------------------------------------------------------------------------------
>
> Key: MIME4J-128
> URL: https://issues.apache.org/jira/browse/MIME4J-128
> Project: JAMES Mime4j
> Issue Type: New Feature
> Affects Versions: 0.6
> Environment: Mime4j 0.6, Http Servlet
> Reporter: Attila Király
> Attachments: message_headless_parse.patch
>
>
> parser.MimeTokenStream has a method called parseHeadless which makes it possible to parse MIME messages without header (which is the case for example in a web application with an incoming http request). This function is however not available in higher level apis of Mime4j like in parser.MimeStreamParser and message.Message. It would be nice to use it trough Message because so other functions of mime4j would be available, like the temporary storage.
> I made a small patch that makes it possible to configure and use message.Message and parser.MimeStreamParser so it will do a headless parse. The patch only adds functionality it does not modify the current behaviour of the classes.
> The patch contains modifications for message.Message (adding 2 new constructors) and parser.MimeStreamParser (adding a new function parseHeadless) and a test case for the headless parsing.
--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.
[jira] Updated: (MIME4J-128) Make o.a.j.m.message.Message and
o.a.j.m.parser.MimeStreamParser be able to do headless parsing by using
o.a.j.m.parser.MimeTokenStream.parseHeadless
Posted by "Robert Burrell Donkin (JIRA)" <mi...@james.apache.org>.
[ https://issues.apache.org/jira/browse/MIME4J-128?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Robert Burrell Donkin updated MIME4J-128:
-----------------------------------------
Fix Version/s: 0.7
Assignee: Robert Burrell Donkin
> Make o.a.j.m.message.Message and o.a.j.m.parser.MimeStreamParser be able to do headless parsing by using o.a.j.m.parser.MimeTokenStream.parseHeadless
> -----------------------------------------------------------------------------------------------------------------------------------------------------
>
> Key: MIME4J-128
> URL: https://issues.apache.org/jira/browse/MIME4J-128
> Project: JAMES Mime4j
> Issue Type: New Feature
> Affects Versions: 0.6
> Environment: Mime4j 0.6, Http Servlet
> Reporter: Attila Király
> Assignee: Robert Burrell Donkin
> Fix For: 0.7
>
> Attachments: message_headless_parse.patch
>
>
> parser.MimeTokenStream has a method called parseHeadless which makes it possible to parse MIME messages without header (which is the case for example in a web application with an incoming http request). This function is however not available in higher level apis of Mime4j like in parser.MimeStreamParser and message.Message. It would be nice to use it trough Message because so other functions of mime4j would be available, like the temporary storage.
> I made a small patch that makes it possible to configure and use message.Message and parser.MimeStreamParser so it will do a headless parse. The patch only adds functionality it does not modify the current behaviour of the classes.
> The patch contains modifications for message.Message (adding 2 new constructors) and parser.MimeStreamParser (adding a new function parseHeadless) and a test case for the headless parsing.
--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.
[jira] Updated: (MIME4J-128) Make o.a.j.m.message.Message and
o.a.j.m.parser.MimeStreamParser be able to do headless parsing by using
o.a.j.m.parser.MimeTokenStream.parseHeadless
Posted by "Attila Király (JIRA)" <mi...@james.apache.org>.
[ https://issues.apache.org/jira/browse/MIME4J-128?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Attila Király updated MIME4J-128:
---------------------------------
Comment: was deleted
(was: The patch.)
> Make o.a.j.m.message.Message and o.a.j.m.parser.MimeStreamParser be able to do headless parsing by using o.a.j.m.parser.MimeTokenStream.parseHeadless
> -----------------------------------------------------------------------------------------------------------------------------------------------------
>
> Key: MIME4J-128
> URL: https://issues.apache.org/jira/browse/MIME4J-128
> Project: JAMES Mime4j
> Issue Type: New Feature
> Affects Versions: 0.6
> Environment: Mime4j 0.6, Http Servlet
> Reporter: Attila Király
> Attachments: message_headless_parse.patch
>
>
> parser.MimeTokenStream has a method called parseHeadless which makes it possible to parse MIME messages without header (which is the case for example in a web application with an incoming http request). This function is however not available in higher level apis of Mime4j like in parser.MimeStreamParser and message.Message. It would be nice to use it trough Message because so other functions of mime4j would be available, like the temporary storage.
> I made a small patch that makes it possible to configure and use message.Message and parser.MimeStreamParser so it will do a headless parse. The patch only adds functionality it does not modify the current behaviour of the classes.
> The patch contains modifications for message.Message (adding 2 new constructors) and parser.MimeStreamParser (adding a new function parseHeadless) and a test case for the headless parsing.
--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.
[jira] Updated: (MIME4J-128) Make o.a.j.m.message.Message and
o.a.j.m.parser.MimeStreamParser be able to do headless parsing by using
o.a.j.m.parser.MimeTokenStream.parseHeadless
Posted by "Attila Király (JIRA)" <mi...@james.apache.org>.
[ https://issues.apache.org/jira/browse/MIME4J-128?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Attila Király updated MIME4J-128:
---------------------------------
Attachment: message_headless_parse.patch
The patch.
> Make o.a.j.m.message.Message and o.a.j.m.parser.MimeStreamParser be able to do headless parsing by using o.a.j.m.parser.MimeTokenStream.parseHeadless
> -----------------------------------------------------------------------------------------------------------------------------------------------------
>
> Key: MIME4J-128
> URL: https://issues.apache.org/jira/browse/MIME4J-128
> Project: JAMES Mime4j
> Issue Type: New Feature
> Affects Versions: 0.6
> Environment: Mime4j 0.6, Http Servlet
> Reporter: Attila Király
> Attachments: message_headless_parse.patch
>
>
> parser.MimeTokenStream has a method called parseHeadless which makes it possible to parse MIME messages without header (which is the case for example in a web application with an incoming http request). This function is however not available in higher level apis of Mime4j like in parser.MimeStreamParser and message.Message. It would be nice to use it trough Message because so other functions of mime4j would be available, like the temporary storage.
> I made a small patch that makes it possible to configure and use message.Message and parser.MimeStreamParser so it will do a headless parse. The patch only adds functionality it does not modify the current behaviour of the classes.
> The patch contains modifications for message.Message (adding 2 new constructors) and parser.MimeStreamParser (adding a new function parseHeadless) and a test case for the headless parsing.
--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.
[jira] Commented: (MIME4J-128) Make o.a.j.m.message.Message and
o.a.j.m.parser.MimeStreamParser be able to do headless parsing by using
o.a.j.m.parser.MimeTokenStream.parseHeadless
Posted by "Markus Wiederkehr (JIRA)" <mi...@james.apache.org>.
[ https://issues.apache.org/jira/browse/MIME4J-128?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12700528#action_12700528 ]
Markus Wiederkehr commented on MIME4J-128:
------------------------------------------
I have to take that back, MimeEntityConfig is in package o.a.j.mime4j.parser and should therefore not be used to configure the behavior of a specific ContentHandler implementation.
+1 to apply the patch as is.
> Make o.a.j.m.message.Message and o.a.j.m.parser.MimeStreamParser be able to do headless parsing by using o.a.j.m.parser.MimeTokenStream.parseHeadless
> -----------------------------------------------------------------------------------------------------------------------------------------------------
>
> Key: MIME4J-128
> URL: https://issues.apache.org/jira/browse/MIME4J-128
> Project: JAMES Mime4j
> Issue Type: New Feature
> Affects Versions: 0.6
> Environment: Mime4j 0.6, Http Servlet
> Reporter: Attila Király
> Assignee: Robert Burrell Donkin
> Fix For: 0.7
>
> Attachments: message_headless_parse.patch
>
>
> parser.MimeTokenStream has a method called parseHeadless which makes it possible to parse MIME messages without header (which is the case for example in a web application with an incoming http request). This function is however not available in higher level apis of Mime4j like in parser.MimeStreamParser and message.Message. It would be nice to use it trough Message because so other functions of mime4j would be available, like the temporary storage.
> I made a small patch that makes it possible to configure and use message.Message and parser.MimeStreamParser so it will do a headless parse. The patch only adds functionality it does not modify the current behaviour of the classes.
> The patch contains modifications for message.Message (adding 2 new constructors) and parser.MimeStreamParser (adding a new function parseHeadless) and a test case for the headless parsing.
--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.
[jira] Updated: (MIME4J-128) Make o.a.j.m.message.Message and
o.a.j.m.parser.MimeStreamParser be able to do headless parsing by using
o.a.j.m.parser.MimeTokenStream.parseHeadless
Posted by "Robert Burrell Donkin (JIRA)" <mi...@james.apache.org>.
[ https://issues.apache.org/jira/browse/MIME4J-128?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Robert Burrell Donkin updated MIME4J-128:
-----------------------------------------
Attachment: alt-headless-message.patch
Here's a modified patch that demonstrates the MimeEntityConfig approach. Headless parsing essentially requires a lower level configuration change, plus a few modifications of the higher level parsers.
> Make o.a.j.m.message.Message and o.a.j.m.parser.MimeStreamParser be able to do headless parsing by using o.a.j.m.parser.MimeTokenStream.parseHeadless
> -----------------------------------------------------------------------------------------------------------------------------------------------------
>
> Key: MIME4J-128
> URL: https://issues.apache.org/jira/browse/MIME4J-128
> Project: JAMES Mime4j
> Issue Type: New Feature
> Affects Versions: 0.6
> Environment: Mime4j 0.6, Http Servlet
> Reporter: Attila Király
> Assignee: Robert Burrell Donkin
> Fix For: 0.7
>
> Attachments: alt-headless-message.patch, message_headless_parse.patch
>
>
> parser.MimeTokenStream has a method called parseHeadless which makes it possible to parse MIME messages without header (which is the case for example in a web application with an incoming http request). This function is however not available in higher level apis of Mime4j like in parser.MimeStreamParser and message.Message. It would be nice to use it trough Message because so other functions of mime4j would be available, like the temporary storage.
> I made a small patch that makes it possible to configure and use message.Message and parser.MimeStreamParser so it will do a headless parse. The patch only adds functionality it does not modify the current behaviour of the classes.
> The patch contains modifications for message.Message (adding 2 new constructors) and parser.MimeStreamParser (adding a new function parseHeadless) and a test case for the headless parsing.
--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.
[jira] Commented: (MIME4J-128) Make o.a.j.m.message.Message and
o.a.j.m.parser.MimeStreamParser be able to do headless parsing by using
o.a.j.m.parser.MimeTokenStream.parseHeadless
Posted by "Oleg Kalnichevski (JIRA)" <mi...@james.apache.org>.
[ https://issues.apache.org/jira/browse/MIME4J-128?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12700456#action_12700456 ]
Oleg Kalnichevski commented on MIME4J-128:
------------------------------------------
DefaultCotnentType parameter (or some such) to be used primarily when parsing headless messages sounds like a reasonable addition to the MimeEntityConfig class. I am also fine with applying the patch as it.
Oleg
> Make o.a.j.m.message.Message and o.a.j.m.parser.MimeStreamParser be able to do headless parsing by using o.a.j.m.parser.MimeTokenStream.parseHeadless
> -----------------------------------------------------------------------------------------------------------------------------------------------------
>
> Key: MIME4J-128
> URL: https://issues.apache.org/jira/browse/MIME4J-128
> Project: JAMES Mime4j
> Issue Type: New Feature
> Affects Versions: 0.6
> Environment: Mime4j 0.6, Http Servlet
> Reporter: Attila Király
> Assignee: Robert Burrell Donkin
> Fix For: 0.7
>
> Attachments: message_headless_parse.patch
>
>
> parser.MimeTokenStream has a method called parseHeadless which makes it possible to parse MIME messages without header (which is the case for example in a web application with an incoming http request). This function is however not available in higher level apis of Mime4j like in parser.MimeStreamParser and message.Message. It would be nice to use it trough Message because so other functions of mime4j would be available, like the temporary storage.
> I made a small patch that makes it possible to configure and use message.Message and parser.MimeStreamParser so it will do a headless parse. The patch only adds functionality it does not modify the current behaviour of the classes.
> The patch contains modifications for message.Message (adding 2 new constructors) and parser.MimeStreamParser (adding a new function parseHeadless) and a test case for the headless parsing.
--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.
[jira] Commented: (MIME4J-128) Make o.a.j.m.message.Message and
o.a.j.m.parser.MimeStreamParser be able to do headless parsing by using
o.a.j.m.parser.MimeTokenStream.parseHeadless
Posted by "Robert Burrell Donkin (JIRA)" <mi...@james.apache.org>.
[ https://issues.apache.org/jira/browse/MIME4J-128?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12703648#action_12703648 ]
Robert Burrell Donkin commented on MIME4J-128:
----------------------------------------------
Attila Király's second patch (message_headless_parse_2.patch) looks like the best approach to me. Unless anyone jumps in with an objection soon, I'll apply it.
> Make o.a.j.m.message.Message and o.a.j.m.parser.MimeStreamParser be able to do headless parsing by using o.a.j.m.parser.MimeTokenStream.parseHeadless
> -----------------------------------------------------------------------------------------------------------------------------------------------------
>
> Key: MIME4J-128
> URL: https://issues.apache.org/jira/browse/MIME4J-128
> Project: JAMES Mime4j
> Issue Type: New Feature
> Affects Versions: 0.6
> Environment: Mime4j 0.6, Http Servlet
> Reporter: Attila Király
> Assignee: Robert Burrell Donkin
> Fix For: 0.7
>
> Attachments: alt-headless-message.patch, message_headless_parse.patch, message_headless_parse_2.patch
>
>
> parser.MimeTokenStream has a method called parseHeadless which makes it possible to parse MIME messages without header (which is the case for example in a web application with an incoming http request). This function is however not available in higher level apis of Mime4j like in parser.MimeStreamParser and message.Message. It would be nice to use it trough Message because so other functions of mime4j would be available, like the temporary storage.
> I made a small patch that makes it possible to configure and use message.Message and parser.MimeStreamParser so it will do a headless parse. The patch only adds functionality it does not modify the current behaviour of the classes.
> The patch contains modifications for message.Message (adding 2 new constructors) and parser.MimeStreamParser (adding a new function parseHeadless) and a test case for the headless parsing.
--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.
[jira] Closed: (MIME4J-128) Make o.a.j.m.message.Message and
o.a.j.m.parser.MimeStreamParser be able to do headless parsing by using
o.a.j.m.parser.MimeTokenStream.parseHeadless
Posted by "Robert Burrell Donkin (JIRA)" <mi...@james.apache.org>.
[ https://issues.apache.org/jira/browse/MIME4J-128?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Robert Burrell Donkin closed MIME4J-128.
----------------------------------------
Resolution: Fixed
Committed the second patch from Attila Király
Many thanks
Robert
> Make o.a.j.m.message.Message and o.a.j.m.parser.MimeStreamParser be able to do headless parsing by using o.a.j.m.parser.MimeTokenStream.parseHeadless
> -----------------------------------------------------------------------------------------------------------------------------------------------------
>
> Key: MIME4J-128
> URL: https://issues.apache.org/jira/browse/MIME4J-128
> Project: JAMES Mime4j
> Issue Type: New Feature
> Affects Versions: 0.6
> Environment: Mime4j 0.6, Http Servlet
> Reporter: Attila Király
> Assignee: Robert Burrell Donkin
> Fix For: 0.7
>
> Attachments: alt-headless-message.patch, message_headless_parse.patch, message_headless_parse_2.patch
>
>
> parser.MimeTokenStream has a method called parseHeadless which makes it possible to parse MIME messages without header (which is the case for example in a web application with an incoming http request). This function is however not available in higher level apis of Mime4j like in parser.MimeStreamParser and message.Message. It would be nice to use it trough Message because so other functions of mime4j would be available, like the temporary storage.
> I made a small patch that makes it possible to configure and use message.Message and parser.MimeStreamParser so it will do a headless parse. The patch only adds functionality it does not modify the current behaviour of the classes.
> The patch contains modifications for message.Message (adding 2 new constructors) and parser.MimeStreamParser (adding a new function parseHeadless) and a test case for the headless parsing.
--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.
[jira] Commented: (MIME4J-128) Make o.a.j.m.message.Message and
o.a.j.m.parser.MimeStreamParser be able to do headless parsing by using
o.a.j.m.parser.MimeTokenStream.parseHeadless
Posted by "Markus Wiederkehr (JIRA)" <mi...@james.apache.org>.
[ https://issues.apache.org/jira/browse/MIME4J-128?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12700526#action_12700526 ]
Markus Wiederkehr commented on MIME4J-128:
------------------------------------------
The patch looks good but like Robert suggested I would prefer an additional property in MimeEntityConfig instead of adding another constructor.
> Make o.a.j.m.message.Message and o.a.j.m.parser.MimeStreamParser be able to do headless parsing by using o.a.j.m.parser.MimeTokenStream.parseHeadless
> -----------------------------------------------------------------------------------------------------------------------------------------------------
>
> Key: MIME4J-128
> URL: https://issues.apache.org/jira/browse/MIME4J-128
> Project: JAMES Mime4j
> Issue Type: New Feature
> Affects Versions: 0.6
> Environment: Mime4j 0.6, Http Servlet
> Reporter: Attila Király
> Assignee: Robert Burrell Donkin
> Fix For: 0.7
>
> Attachments: message_headless_parse.patch
>
>
> parser.MimeTokenStream has a method called parseHeadless which makes it possible to parse MIME messages without header (which is the case for example in a web application with an incoming http request). This function is however not available in higher level apis of Mime4j like in parser.MimeStreamParser and message.Message. It would be nice to use it trough Message because so other functions of mime4j would be available, like the temporary storage.
> I made a small patch that makes it possible to configure and use message.Message and parser.MimeStreamParser so it will do a headless parse. The patch only adds functionality it does not modify the current behaviour of the classes.
> The patch contains modifications for message.Message (adding 2 new constructors) and parser.MimeStreamParser (adding a new function parseHeadless) and a test case for the headless parsing.
--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.
[jira] Updated: (MIME4J-128) Make o.a.j.m.message.Message and
o.a.j.m.parser.MimeStreamParser be able to do headless parsing by using
o.a.j.m.parser.MimeTokenStream.parseHeadless
Posted by "Attila Király (JIRA)" <mi...@james.apache.org>.
[ https://issues.apache.org/jira/browse/MIME4J-128?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Attila Király updated MIME4J-128:
---------------------------------
Attachment: message_headless_parse_2.patch
I just made a second variant of my original patch.
- Added defaultContentType property to parser.MimeEntityConfig.
- Now every headless related logic is done in parser.MimeStreamParser alone.
This variant leaves every all classes wihtout modification even message.Message too.
> Make o.a.j.m.message.Message and o.a.j.m.parser.MimeStreamParser be able to do headless parsing by using o.a.j.m.parser.MimeTokenStream.parseHeadless
> -----------------------------------------------------------------------------------------------------------------------------------------------------
>
> Key: MIME4J-128
> URL: https://issues.apache.org/jira/browse/MIME4J-128
> Project: JAMES Mime4j
> Issue Type: New Feature
> Affects Versions: 0.6
> Environment: Mime4j 0.6, Http Servlet
> Reporter: Attila Király
> Assignee: Robert Burrell Donkin
> Fix For: 0.7
>
> Attachments: alt-headless-message.patch, message_headless_parse.patch, message_headless_parse_2.patch
>
>
> parser.MimeTokenStream has a method called parseHeadless which makes it possible to parse MIME messages without header (which is the case for example in a web application with an incoming http request). This function is however not available in higher level apis of Mime4j like in parser.MimeStreamParser and message.Message. It would be nice to use it trough Message because so other functions of mime4j would be available, like the temporary storage.
> I made a small patch that makes it possible to configure and use message.Message and parser.MimeStreamParser so it will do a headless parse. The patch only adds functionality it does not modify the current behaviour of the classes.
> The patch contains modifications for message.Message (adding 2 new constructors) and parser.MimeStreamParser (adding a new function parseHeadless) and a test case for the headless parsing.
--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.
[jira] Commented: (MIME4J-128) Make o.a.j.m.message.Message and
o.a.j.m.parser.MimeStreamParser be able to do headless parsing by using
o.a.j.m.parser.MimeTokenStream.parseHeadless
Posted by "Robert Burrell Donkin (JIRA)" <mi...@james.apache.org>.
[ https://issues.apache.org/jira/browse/MIME4J-128?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12700450#action_12700450 ]
Robert Burrell Donkin commented on MIME4J-128:
----------------------------------------------
The patch applies well and looks good. However, I wonder whether it might be better to add content type to MimeEntityConfig.
IIRC MimeEntityConfig was introduced as a parameter object to reduce the number of different constructors required. The construction parameter contentType is essentially used to control whether to use headless parsing. IMHO this would make it a reasonable fit within MimeEntityConfig.
> Make o.a.j.m.message.Message and o.a.j.m.parser.MimeStreamParser be able to do headless parsing by using o.a.j.m.parser.MimeTokenStream.parseHeadless
> -----------------------------------------------------------------------------------------------------------------------------------------------------
>
> Key: MIME4J-128
> URL: https://issues.apache.org/jira/browse/MIME4J-128
> Project: JAMES Mime4j
> Issue Type: New Feature
> Affects Versions: 0.6
> Environment: Mime4j 0.6, Http Servlet
> Reporter: Attila Király
> Assignee: Robert Burrell Donkin
> Fix For: 0.7
>
> Attachments: message_headless_parse.patch
>
>
> parser.MimeTokenStream has a method called parseHeadless which makes it possible to parse MIME messages without header (which is the case for example in a web application with an incoming http request). This function is however not available in higher level apis of Mime4j like in parser.MimeStreamParser and message.Message. It would be nice to use it trough Message because so other functions of mime4j would be available, like the temporary storage.
> I made a small patch that makes it possible to configure and use message.Message and parser.MimeStreamParser so it will do a headless parse. The patch only adds functionality it does not modify the current behaviour of the classes.
> The patch contains modifications for message.Message (adding 2 new constructors) and parser.MimeStreamParser (adding a new function parseHeadless) and a test case for the headless parsing.
--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.