[Python-bugs-list] [ python-Bugs-417176 ] MultiFile.read() includes CRLF boundary

noreply@sourceforge.net noreply@sourceforge.net
Thu, 26 Apr 2001 12:18:54 -0700


Bugs item #417176, was updated on 2001-04-18 15:22
You can respond by visiting: 
http://sourceforge.net/tracker/?func=detail&atid=105470&aid=417176&group_id=5470

Category: Python Library
Group: None
Status: Open
Resolution: None
Priority: 5
Submitted By: Martijn Pieters (mjpieters)
>Assigned to: Barry Warsaw (bwarsaw)
Summary: MultiFile.read() includes CRLF boundary

Initial Comment:
multifile.MultiFile.readlines()and .read() will return 
a body of a multipart message including the line 
delimiter that is to be regarded part of the boundary.

In a partial multipart message like:

--BoundaryHere
Content-Type: text/plain

1
2
3
4
--BoundaryHere

the message within the delimiters does not include the 
final line delimiter (CRLF or LF or whatnot) after the 
line reading '4'; it is considered part of the 
boundary. MultiFile however, returns it as part of the 
body.

See RFC2046 section 5.1.1. In the usual text 
formatting of the RFC, you'll find the definition and 
explanation in the first two paragraphs of page 19.


----------------------------------------------------------------------

You can respond by visiting: 
http://sourceforge.net/tracker/?func=detail&atid=105470&aid=417176&group_id=5470