Return-Path: Delivered-To: apmail-myfaces-dev-archive@www.apache.org Received: (qmail 4834 invoked from network); 13 Apr 2006 00:28:27 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (209.237.227.199) by minotaur.apache.org with SMTP; 13 Apr 2006 00:28:27 -0000 Received: (qmail 9055 invoked by uid 500); 13 Apr 2006 00:28:23 -0000 Delivered-To: apmail-myfaces-dev-archive@myfaces.apache.org Received: (qmail 8516 invoked by uid 500); 13 Apr 2006 00:28:21 -0000 Mailing-List: contact dev-help@myfaces.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: "MyFaces Development" Delivered-To: mailing list dev@myfaces.apache.org Received: (qmail 8503 invoked by uid 99); 13 Apr 2006 00:28:21 -0000 Received: from asf.osuosl.org (HELO asf.osuosl.org) (140.211.166.49) by apache.org (qpsmtpd/0.29) with ESMTP; Wed, 12 Apr 2006 17:28:21 -0700 X-ASF-Spam-Status: No, hits=0.0 required=10.0 tests= X-Spam-Check-By: apache.org Received: from [192.87.106.226] (HELO ajax.apache.org) (192.87.106.226) by apache.org (qpsmtpd/0.29) with ESMTP; Wed, 12 Apr 2006 17:28:20 -0700 Received: from ajax (localhost.localdomain [127.0.0.1]) by ajax.apache.org (Postfix) with ESMTP id E0FF0D4A05 for ; Thu, 13 Apr 2006 01:27:59 +0100 (BST) Message-ID: <358000236.1144888079919.JavaMail.jira@ajax> Date: Thu, 13 Apr 2006 01:27:59 +0100 (BST) From: "Adam Winer (JIRA)" To: dev@myfaces.apache.org Subject: [jira] Commented: (TOMAHAWK-249) ExtensionFilter does not play nice with other filters performing file uploads In-Reply-To: <766643660.1144887959030.JavaMail.jira@ajax> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit X-Virus-Checked: Checked by ClamAV on apache.org X-Spam-Rating: minotaur.apache.org 1.6.2 0/1000/N [ http://issues.apache.org/jira/browse/TOMAHAWK-249?page=comments#action_12374281 ] Adam Winer commented on TOMAHAWK-249: ------------------------------------- (OK, not a "patch available" strictly speaking, but see the above code for getContentType()) > ExtensionFilter does not play nice with other filters performing file uploads > ----------------------------------------------------------------------------- > > Key: TOMAHAWK-249 > URL: http://issues.apache.org/jira/browse/TOMAHAWK-249 > Project: MyFaces Tomahawk > Type: Bug > Components: File Upload > Versions: 1.1.2-SNAPSHOT > Environment: Generic issue. > Reporter: Adam Winer > > 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"; > } -- This message is automatically generated by JIRA. - If you think it was sent incorrectly contact one of the administrators: http://issues.apache.org/jira/secure/Administrators.jspa - For more information on JIRA, see: http://www.atlassian.com/software/jira