Uploaded image for project: 'Geronimo'
  1. Geronimo
  2. GERONIMO-3842

Incorrect Subject header encoding for long non-ascii line

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Closed
    • Major
    • Resolution: Fixed
    • 2.0.2
    • None
    • mail
    • Security Level: public (Regular issues)
    • None

    Description

      Method MimeMessage.setSubject(subj, enc) when "subj" long enough and includes non-ascii characters produce incorrect Subject header.
      Using "subj":

      Проверка. Достаточно длинная тема пиьма. Проверка. Проверка.
      

      "enc": UTF-8

      Subject header looks like:

      Subject:      =?UTF-8?B?0J/RgNC+0LLQtdGA0LrQsC4g0JTQvtGB0YLQsNGC0L7Rh9C90L4g0LTQu9C40L3Q?==?UTF-8?B?vdCw0Y8g0YLQtdC80LAg0L/QuNGM0LzQsC4g0J/RgNC+0LLQtdGA0LrQsC4g0J/R?==?UTF-8?B?gNC+0LLQtdGA0LrQsC4=?=
      

      So, there is none line breaks (folding) near "?==?UTF-8?".
      There is a lot of mail clients which can`t parse this header correctly.

      Attachments

        1. G3842Sample.java
          0.6 kB
          Andrey Utkin

        Activity

          People

            rickmcguire Richard McGuire
            ciand7 Andrey Utkin
            Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: