You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@myfaces.apache.org by "Adam Winer (JIRA)" <de...@myfaces.apache.org> on 2006/04/13 02:25:59 UTC
[jira] Created: (TOMAHAWK-249) ExtensionFilter does not play nice
with other filters performing file uploads
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
[jira] Updated: (TOMAHAWK-249) ExtensionFilter does not play nice
with other filters performing file uploads
Posted by "Adam Winer (JIRA)" <de...@myfaces.apache.org>.
[ http://issues.apache.org/jira/browse/TOMAHAWK-249?page=all ]
Adam Winer updated TOMAHAWK-249:
--------------------------------
Status: Patch Available (was: Open)
> 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
[jira] Commented: (TOMAHAWK-249) ExtensionFilter does not play nice
with other filters performing file uploads
Posted by "Adam Winer (JIRA)" <de...@myfaces.apache.org>.
[ 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
[jira] Closed: (TOMAHAWK-249) ExtensionFilter does not play nice
with other filters performing file uploads
Posted by "Matthias Weßendorf (JIRA)" <de...@myfaces.apache.org>.
[ http://issues.apache.org/jira/browse/TOMAHAWK-249?page=all ]
Matthias Weßendorf closed TOMAHAWK-249:
---------------------------------------
Resolution: Fixed
patch applied, thanks Adam
> 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
> Assignee: Matthias Weßendorf
>
> 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