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

Filename encoding is wrong in MultipartFormDataInput with RestEasy and Wildfly 11

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Done
    • Icon: Major Major
    • 3.6.0.Final, 4.0.0.Beta4
    • None
    • None
    • None

      My upload rest method works fine unless the filename contains a special character:

          @POST
          @Consumes({ MediaType.MULTIPART_FORM_DATA })
          public Response uploadFile(MultipartFormDataInput input) {
          	Map<String, List<InputPart>> uploadForm = input.getFormDataMap();
          	List<InputPart> inputParts = uploadForm.get("file_upload");
              // Do Stuff...
          }
      

      The filename is *Test.png*, inputPart.getHeaders() = [Content-Disposition=form-data; name="tws_file"; filename="test.png",Content-Type=image/png]
      --> OK

      The filename is *Döner.png*, inputPart.getHeaders() = [Content-Disposition=form-data; name="tws_file"; filename="d��ner.png",Content-Type=image/png]
      --> Not OK

      As you can see, the "ö" becomes "��".I am using Wildfly 11 and Resteasy-multipart-provider 3.0.24.Final

              pjurak Petr Jurak (Inactive)
              theparadox_jira Tim G (Inactive)
              Votes:
              0 Vote for this issue
              Watchers:
              3 Start watching this issue

                Created:
                Updated:
                Resolved: