[mel-base-devel] mel.mime:parts not working properly for rfc 2822 (reading from a file)

Fred Gibson fred at streamfocus.com
Thu Jan 28 16:49:42 UTC 2010


Would that approach work with an alternative structure where both a
text/plain and a text/html have the same boundary?  I was thinking
that the content-type would need to be used to get an exact part
match.

How about:

> Given some part P with boundary B
> 1) Locate the message object by following the parent chain
> 2) Get a message-body-stream
> 3) scan the stream for the boundary B
4) if boundary is found
5)  process the content-type
          if content-type matches
          then return stream as part-stream
          else go to 3)


5) if
On Thu, Jan 28, 2010 at 8:39 AM, Jochen Schmidt <js at crispylogics.com> wrote:
>
> Am 28.01.2010 um 17:32 schrieb Fred Gibson:
>
>> How about a function such as "(defun skip-rfc2822-header-part (stream
>> part) ..." which would read the stream just past the desired header?
>>
>> I can take a pass at this if it would help.
>
> I don't think so. It would be fixing symptoms. I think the right thing to do would be scanning for the boundary in question and then calling just skrip-rfc2822-headers on the stream.
>
> Given some part P with boundary B
> 1) Locate the message object by following the parent chain
> 2) Get a message-body-stream
> 3) scan the stream for the boundary B
> 4) If boundary is found => return stream as part-stream
>
> If you want a part-body-stream just get a part-stream and do skip-rfc2822-headers.
>
> ciao,
> Jochen
>
>>
>> My best,
>>
>> Fred
>>
>> On Thu, Jan 28, 2010 at 8:05 AM, Jochen Schmidt <js at crispylogics.com> wrote:
>>>
>>> Am 28.01.2010 um 16:56 schrieb Fred Gibson:
>>>
>>>> Hi Jochen,
>>>>
>>>> On further looking at the problem, the scan and multipart-read seem to
>>>> work exactly as designed no matter the message complexity - very nice.
>>>> The reason I'm getting strange results is when using
>>>> part-body-string, there seems to be a problem with not skipping enough
>>>> headers with increased message complexity, thereby giving a bad read
>>>> on a correctly parsed part.  I'm working on troubleshooting this now.
>>>
>>> I've also looked into this. Scanning and creating body structures is not the problem.
>>> Actually part-body-string does only work for quite simple multipart messages. I had an idea though how to simplify part lookup and at the same time support komplex multipart messages:
>>>
>>> AFAIR the body structure stores the boundary of the part. So it should be possible to scan the message for the beginning boundary tag of the given part - completely ignoring any hierarchy. I'll try that as soon as my time permits.
>>>
>>> ciao,
>>> Jochen
>>>
>>> --
>>> Jochen Schmidt
>>> CRISPYLOGICS
>>> Uhlandstr. 9, 90408 Nuremberg
>>>
>>> Fon +49 (0)911 517 999 82
>>> Fax +49 (0)911 517 999 83
>>>
>>> mailto:(format nil "~(~36r@~36r.~36r~)" 870180 1680085828711918828 16438) http://www.crispylogics.com
>>>
>>>
>>
>>
>>
>> --
>> Fred Gibson
>>
>> Founder / Software Developer
>> http://www.streamfocus.com
>>
>> (c)2010 Organon Technologies LLC
>
>



-- 
Fred Gibson

Founder / Software Developer
http://www.streamfocus.com

(c)2010 Organon Technologies LLC




More information about the mel-base-devel mailing list