Uploaded image for project: 'James Server'
  1. James Server
  2. JAMES-356

MimeMessageWrapper does not handle multiline headers

    Details

    • Type: Bug
    • Status: Closed
    • Priority: Minor
    • Resolution: Fixed
    • Affects Version/s: 2.2.0
    • Fix Version/s: 2.3.0
    • Component/s: James Core
    • Labels:
      None
    • Environment:
      James 2.2.0, JDK1.4.2/JDK1.5, Linux Fedora/Windowx XP

      Description

      getSubject in MimeMessageWrapper does not unfold header content. This cause errors for example while DSNBounce'ing a MimeMessage with a long subject (multiline if more than 77 chars).

      It should call "unfold()" method from the MimeMessage class but this is private, so we should rewrite an unfold procedure.

      1. MimeMessageWrapper.java.patch
        5 kB
        Stefano Bagnara
      2. MimeMessageWrapperTest.java.patch
        1 kB
        Stefano Bagnara

        Activity

        Hide
        bago Stefano Bagnara added a comment -

        Here is the patch and the test that shows the bug and the fixed behaviour.

        Show
        bago Stefano Bagnara added a comment - Here is the patch and the test that shows the bug and the fixed behaviour.
        Hide
        bago Stefano Bagnara added a comment -

        Created an unfold method (not so optimized) and added it to the subject handling routine

        Show
        bago Stefano Bagnara added a comment - Created an unfold method (not so optimized) and added it to the subject handling routine
        Hide
        danny@apache.org Danny Angus added a comment -

        Closing issue fixed in released version.

        Show
        danny@apache.org Danny Angus added a comment - Closing issue fixed in released version.

          People

          • Assignee:
            bago Stefano Bagnara
            Reporter:
            bago Stefano Bagnara
          • Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

            Dates

            • Created:
              Updated:
              Resolved:

              Development