Uploaded image for project: 'CXF'
  1. CXF
  2. CXF-6832

Attachment content-disposition modification-date not parsed correctly

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Closed
    • Minor
    • Resolution: Fixed
    • None
    • 3.1.6, 3.0.9, 3.2.0
    • Core
    • None
    • Unknown

    Description

      When deserializing multipart content as org.apache.cxf.jaxrs.ext.multipart.Attachment, the org.apache.cxf.attachment.ContentDisposition data are not correctly filled in. Those valid fields are not set:

      • creation-date date when content was created [RFC2183]
      • modification-date date when content was last modified [RFC2183]
      • read-date date when content was last read [RFC2183]

      Exemple of Rest WebService declaration:
      public void put(@PathParam("path") String path,
      @Multipart(value = "file", required = false) Attachment attachment) throws IOException {
      System.out.println(attachment.getContentDisposition().getParameter("modification-date")); --> always null
      }

      Actually, the REGEXP pattern used in ContentDisposition.CD_HEADER_PARAMS_PATTERN is not correct as it doesn't include '-' character. So the key is not 'modification-date' but rather 'date' in the map.

      Attachments

        Activity

          People

            sergey_beryozkin Sergey Beryozkin
            multanis Nicolas Daniels
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: