Uploaded image for project: 'MyFaces Tomahawk'
  1. MyFaces Tomahawk
  2. TOMAHAWK-249

ExtensionFilter does not play nice with other filters performing file uploads

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Closed
    • Major
    • Resolution: Fixed
    • 1.1.2-SNAPSHOT
    • None
    • File Upload
    • None
    • Generic issue.

    Description

      If you have both the ExtensionsFilter and the AdfFacesFilter installed (both are required by the respective libraries), and the ExtensionsFilter goes first, any page containing a file upload will fail (non-upload fields, everything). This is because both filters are attempting to process the upload. If you flip the order, things (should) work.

      In theory, you might say "don't have two filters trying to do file upload", but in practice, a lot of filters serve multiple purposes, so it's not nearly that simple.

      Simple fix, though: MultipartRequestWrapper needs to override getContentType() to indicate to the system that it has processed the file upload (and prevent any other filters from doing so); just add:

      public String getContentType()

      { return "application/x-www-form-urlencoded"; }

      Attachments

        Activity

          People

            matzew Matthias Wessendorf
            adamwiner Adam Winer
            Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: