Menu

#110 Let ::mime::parsepart accept a header only with multipart

open
mime (12)
5
2003-10-24
2003-08-21
No

When calling ::mime::initialize with a header only and the
header includes a multipart description, ::mime::parsepart
will return an end-of-file error.
This patch fixes that by counting the lines after the
header. If no lines are found, no error is thrown.

This is useful when you want to parse a mail header only
with help of the mime package.

Something to think of:
This only works if the last newline character returned
from ::pop3::top is removed prior to calling ::mime::
initialize. I thought of patching pop3 too, but thought
that it's correct that the last line returned also contains
a newline character.
To help the user so he not needs to think of removing the
last newline character, maybe ::mime::parsepart should
count non-blank lines after the header, instead of just
counting lines.

Discussion

  • Ingemar Hansson

    Ingemar Hansson - 2003-08-21

    Diff between tcllib 1.5(!) mime.tcl and the modified one.

     
  • Ingemar Hansson

    Ingemar Hansson - 2003-09-10
    • labels: --> mime
     
  • Andreas Kupries

    Andreas Kupries - 2003-10-24
    • assigned_to: nobody --> mrose
     
  • Andreas Kupries

    Andreas Kupries - 2004-09-29

    Logged In: YES
    user_id=75003

    Marshall, does this make sense ?

    Or should we have a special command just for parsing the
    header of a mail or mime part ?