Tk Library Source Code

View Ticket
Login
Ticket UUID: 792796
Title: Let ::mime::parsepart accept a header only with multipart
Type: Patch Version: None
Submitter: ingemarh Created on: 2003-08-21 22:22:40
Subsystem: mime Assigned To: mrose
Priority: 5 Medium Severity:
Status: Closed Last Modified: 2013-07-04 17:25:32
Resolution: Not Applicable Here Closed By:
    Closed on:
Description:
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.
User Comments: andreas_kupries added on 2004-09-30 04:50:56:
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 ?

ingemarh added on 2003-08-22 05:22:40:

File Added - 59421: mime.diff

Attachments: