1 Reply Latest reply: Jun 12, 2014 1:21 PM by Bill Shannon-Oracle RSS

    Getting parseException if filename is not enclosed within quotes.

    3b8cd5fc-8ce5-4f4e-b7b0-2e0cdac38db2

      My Client has sent attachment with filename encoded in iso-8859-2. When I parse the mail using javamail, i had ended up parseException. Below is the header and exception details.

       

      header:

      Content-Type: application/pdf; name==?iso-8859-2?b?RmFrdPpyYV9GQTE0MDE5LnBkZg==?=

      Content-Transfer-Encoding: base64

      Content-Disposition: attachment; filename==?iso-8859-2?b?RmFrdPpyYV9GQTE0MDE5LnBkZg==?=

      Exception:

      javax.mail.internet.ParseException: Expected parameter value, got "="|

      [13:29:47:905]|[06-12-2014]|[SYSOUT]|[INFO]|[log]|[557]: at javax.mail.internet.ParameterList.<init>(ParameterList.java:262)|

      [13:29:47:905]|[06-12-2014]|[SYSOUT]|[INFO]|[log]|[557]: at javax.mail.internet.ContentDisposition.<init>(ContentDisposition.java:100)|

      [13:29:47:905]|[06-12-2014]|[SYSOUT]|[INFO]|[log]|[557]: at javax.mail.internet.MimeBodyPart.getFileName(MimeBodyPart.java:1136)|

      [13:29:47:906]|[06-12-2014]|[SYSOUT]|[INFO]|[log]|[557]: at javax.mail.internet.MimeBodyPart.getFileName(MimeBodyPart.java:513)|

       

      But when i read RFC 2183, it doesnot tell that the filename must be enclosed within quotes.

       

      But in the parameterList class you are expecting all the field values have to be enclosed within quotes.

       

      Please check and correct this.

       

      Manimekalai