This issue tracker has been migrated to GitHub, and is currently read-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.

Author customdesigned
Recipients
Date 2003-08-26.02:48:44
SpamBayes Score
Marked as misclassified
Message-id
In-reply-to
Content
Logged In: YES 
user_id=142072

Here is a fix for this bug.  The problem is that the message
attachment is not being decoded before parsing.

*** Parser.py   Mon Aug 25 22:43:34 2003
--- /usr/lib/python2.2/email/Parser.py  Tue Nov 12 16:50:20 2002
***************
*** 249,262 ****
          elif container.get_main_type() == 'message':
              # Create a container for the payload, but
watch out for there not
              # being any headers left
-             container.set_payload(fp.read())
-           fp = StringIO(container.get_payload(decode=True))
              try:
                  msg = self.parse(fp)
              except Errors.HeaderParseError:
                  msg = self._class()
                  self._parsebody(msg, fp)
!             container.set_payload([msg])
          else:
              container.set_payload(fp.read())
  
--- 249,260 ----
          elif container.get_main_type() == 'message':
              # Create a container for the payload, but
watch out for there not
              # being any headers left
              try:
                  msg = self.parse(fp)
              except Errors.HeaderParseError:
                  msg = self._class()
                  self._parsebody(msg, fp)
!             container.attach(msg)
          else:
              container.set_payload(fp.read())
  
History
Date User Action Args
2007-08-23 14:16:24adminlinkissue794458 messages
2007-08-23 14:16:24admincreate