You are viewing a plain text version of this content. The canonical link for it is here.
Posted to server-dev@james.apache.org by Robert Burrell Donkin <ro...@gmail.com> on 2007/08/07 14:44:21 UTC

Re: [jira] Commented: (MIME4J-23) [JW#3] Drop lazy syntax checking or make it optional

On 8/6/07, Stefano Bagnara <ap...@bago.org> wrote:
> Robert Burrell Donkin (JIRA) ha scritto:
> >     [ https://issues.apache.org/jira/browse/MIME4J-23?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel#action_12518011 ]
> >
> > Robert Burrell Donkin commented on MIME4J-23:
> > ---------------------------------------------
> >
> > Optional may be better than dropping. There are times when good enough is best when dealing with emails.
> >
> > Perhaps monitor pattern (recording them as events) would be useful
>
> I never used the monitor pattern for server side libraries, but I'm
> interested in how it could apply to this scenario.
>
> From a developer perspective it seems to be more easy to receive
> exceptions on failure when a strict parsing is enabled, but maybe both
> solutions can be enabled providing a wrapper that will parse the
> message, listen for events and throw exceptions when a given event is
> received.

the current, lazy behaviour is useful for some use case. throwing an
exception generally means that it's impossible to continue. with a
pull parser, one option is to report each error as an additional event
in the stream. the current lazy behaviour could be retained by
introducing a flag for reporting these events.

- robert

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


Re: [jira] Commented: (MIME4J-23) [JW#3] Drop lazy syntax checking or make it optional

Posted by Norman Maurer <no...@apache.org>.
Stefano Bagnara schrieb:
> Robert Burrell Donkin ha scritto:
>   
>> On 8/6/07, Stefano Bagnara <ap...@bago.org> wrote:
>>     
>>> Robert Burrell Donkin (JIRA) ha scritto:
>>>       
>>>>     [ https://issues.apache.org/jira/browse/MIME4J-23?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel#action_12518011 ]
>>>>
>>>> Robert Burrell Donkin commented on MIME4J-23:
>>>> ---------------------------------------------
>>>>
>>>> Optional may be better than dropping. There are times when good enough is best when dealing with emails.
>>>>
>>>> Perhaps monitor pattern (recording them as events) would be useful
>>>>         
>>> I never used the monitor pattern for server side libraries, but I'm
>>> interested in how it could apply to this scenario.
>>>
>>> From a developer perspective it seems to be more easy to receive
>>> exceptions on failure when a strict parsing is enabled, but maybe both
>>> solutions can be enabled providing a wrapper that will parse the
>>> message, listen for events and throw exceptions when a given event is
>>> received.
>>>       
>> the current, lazy behaviour is useful for some use case. throwing an
>> exception generally means that it's impossible to continue. with a
>> pull parser, one option is to report each error as an additional event
>> in the stream. the current lazy behaviour could be retained by
>> introducing a flag for reporting these events.
>>     
>
> Introducing parsing errors as event in the stream seems a good plan to me.
>
> I'm not sure I understand where, in the code, this should be handled,
> but I'll review the code!
>
> I agree that a generic library (like mime4j) should support both the
> strict and the relaxed parsing.
>
> Stefano
>
>   

+1
Norman

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


Re: [jira] Commented: (MIME4J-23) [JW#3] Drop lazy syntax checking or make it optional

Posted by Stefano Bagnara <ap...@bago.org>.
Robert Burrell Donkin ha scritto:
> On 8/6/07, Stefano Bagnara <ap...@bago.org> wrote:
>> Robert Burrell Donkin (JIRA) ha scritto:
>>>     [ https://issues.apache.org/jira/browse/MIME4J-23?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel#action_12518011 ]
>>>
>>> Robert Burrell Donkin commented on MIME4J-23:
>>> ---------------------------------------------
>>>
>>> Optional may be better than dropping. There are times when good enough is best when dealing with emails.
>>>
>>> Perhaps monitor pattern (recording them as events) would be useful
>> I never used the monitor pattern for server side libraries, but I'm
>> interested in how it could apply to this scenario.
>>
>> From a developer perspective it seems to be more easy to receive
>> exceptions on failure when a strict parsing is enabled, but maybe both
>> solutions can be enabled providing a wrapper that will parse the
>> message, listen for events and throw exceptions when a given event is
>> received.
> 
> the current, lazy behaviour is useful for some use case. throwing an
> exception generally means that it's impossible to continue. with a
> pull parser, one option is to report each error as an additional event
> in the stream. the current lazy behaviour could be retained by
> introducing a flag for reporting these events.

Introducing parsing errors as event in the stream seems a good plan to me.

I'm not sure I understand where, in the code, this should be handled,
but I'll review the code!

I agree that a generic library (like mime4j) should support both the
strict and the relaxed parsing.

Stefano


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