Uploaded image for project: 'RESTEasy'
  1. RESTEasy
  2. RESTEASY-3258

org.jboss.resteasy.plugins.providers.multipart.ResteasyEntityPartBuilder does not set default media type as dictated by RTF-7578

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Done
    • Icon: Major Major
    • 6.2.2.Final
    • 6.2.0.Final, 6.2.1.Final
    • jaxrs
    • None

      Section 4.4 of the multipart/formdata RFC-7578 dictates that default media types be set in the Content-Type head field for each part:
      4.4. Content-Type Header Field for Each Part Each part MAY have an (optional) "Content-Type" header field, which
      defaults to "text/plain". If the contents of a file are to be sent,
      the file data SHOULD be labeled with an appropriate media type, if
      known, or "application/octet-stream".
       

      RestEasyEntityPartBuilder does not set these defaults, which can result in NullPointerException if the MediaType is not set.

              Unassigned Unassigned
              jim_krueger Jim Krueger (Inactive)
              Votes:
              0 Vote for this issue
              Watchers:
              1 Start watching this issue

                Created:
                Updated:
                Resolved: