mimepull
  1. mimepull
  2. MIMEPULL-7

MIMEParser creating garbled header

    Details

    • Type: Bug Bug
    • Status: Resolved
    • Priority: Major Major
    • Resolution: Fixed
    • Affects Version/s: None
    • Fix Version/s: 1.9.1
    • Component/s: None
    • Labels:
      None

      Description

      In com/sun/xml/internal/org/jvnet/mimepull/MIMEParser.java we have a method called readLine which reads the data containing only ASCII characters from the input stream. This method will return a String and the String constructor takes default platform encoding for constructing string as encoding is not specified directly

      In cases where the platform encoding is not ascii , this method picks the specific non-ascii encoding, thus creating garbled header .

      If we fix the string creation to pick the exact charset which is ASCII always , the problem is addressed .

      Caused by: java.lang.IllegalStateException: Internal Error. Didn't get Headers even after complete parsing.
      at com.sun.xml.internal.org.jvnet.mimepull.MIMEPart.getHeaders(MIMEPart.java:145)
      at com.sun.xml.internal.org.jvnet.mimepull.MIMEPart.getContentType(MIMEPart.java:135)
      at com.sun.xml.internal.ws.encoding.MimeMultipartParser$PartAttachment.getContentType(MimeMultipartParser.java:168)
      at com.sun.xml.internal.ws.encoding.SOAPBindingCodec.decode(SOAPBindingCodec.java:343)
      at com.sun.xml.internal.ws.encoding.MimeCodec.decode(MimeCodec.java:181)
      at com.sun.xml.internal.ws.encoding.SOAPBindingCodec.decode(SOAPBindingCodec.java:282)

      Patch is attached .

      1. patch.txt
        0.6 kB
        Jayashree_Viswanathan

        Activity

        There are no comments yet on this issue.

          People

          • Assignee:
            Martin Grebac
            Reporter:
            Jayashree_Viswanathan
          • Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

            Dates

            • Created:
              Updated:
              Resolved: