Return-Path: Delivered-To: apmail-commons-issues-archive@minotaur.apache.org Received: (qmail 7690 invoked from network); 8 Mar 2011 21:42:25 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (140.211.11.3) by minotaur.apache.org with SMTP; 8 Mar 2011 21:42:25 -0000 Received: (qmail 73956 invoked by uid 500); 8 Mar 2011 21:42:22 -0000 Delivered-To: apmail-commons-issues-archive@commons.apache.org Received: (qmail 73828 invoked by uid 500); 8 Mar 2011 21:42:22 -0000 Mailing-List: contact issues-help@commons.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: issues@commons.apache.org Delivered-To: mailing list issues@commons.apache.org Received: (qmail 73739 invoked by uid 99); 8 Mar 2011 21:42:22 -0000 Received: from athena.apache.org (HELO athena.apache.org) (140.211.11.136) by apache.org (qpsmtpd/0.29) with ESMTP; Tue, 08 Mar 2011 21:42:22 +0000 X-ASF-Spam-Status: No, hits=-2000.0 required=5.0 tests=ALL_TRUSTED,T_RP_MATCHES_RCVD X-Spam-Check-By: apache.org Received: from [140.211.11.116] (HELO hel.zones.apache.org) (140.211.11.116) by apache.org (qpsmtpd/0.29) with ESMTP; Tue, 08 Mar 2011 21:42:21 +0000 Received: from hel.zones.apache.org (hel.zones.apache.org [140.211.11.116]) by hel.zones.apache.org (Postfix) with ESMTP id B626A39E312 for ; Tue, 8 Mar 2011 21:42:00 +0000 (UTC) Date: Tue, 8 Mar 2011 21:42:00 +0000 (UTC) From: "Jen (JIRA)" To: issues@commons.apache.org Message-ID: <734351726.6244.1299620520742.JavaMail.tomcat@hel.zones.apache.org> Subject: [jira] Commented: (FILEUPLOAD-130) Add ability to get any header from the FileItem and FileItemStream interfaces MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit X-JIRA-FingerPrint: 30527f35849b9dde25b450d4833f0394 [ https://issues.apache.org/jira/browse/FILEUPLOAD-130?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13004236#comment-13004236 ] Jen commented on FILEUPLOAD-130: -------------------------------- Using commons-fileupload-1.2.2 and having same problem as Guillaume's post above regarding retrieving the "Content-Transfer-Encoding" to detect base64 encoding. DiskFileItem getHeaders() is returned as null > Add ability to get any header from the FileItem and FileItemStream interfaces > ----------------------------------------------------------------------------- > > Key: FILEUPLOAD-130 > URL: https://issues.apache.org/jira/browse/FILEUPLOAD-130 > Project: Commons FileUpload > Issue Type: Improvement > Affects Versions: 1.2 > Reporter: Michael Macaluso > Priority: Minor > Fix For: 1.2.1 > > Attachments: FILEUPLOAD-130.patch, FileUpload-130_1.patch, FileUpload-130_2.patch, commons-fileupload-1.2.1-items-headers-issue.patch > > > The FileItem and FileItemStream interfaces should have a way to return back any header that was encountered during the header parsing for an "Item". Currently, from the FileItemStatus you can only get information from the 2 pre-defined headers "Content-Type" and "Content-Disposition" (Sort-of because the header can not be accessed raw). Other than the interface changes (including the change to pass them along in the FileItemFactory interface), it appears that all changes can be made within the FileUploadBase.java file. FileUploadBase.java:859 (as of 1.2) has the headers, but the call to create the FileItemStreamImpl on lines 877 and 887 do not include the headers map. Further, the parseRequest method uses the FileItemStream interface to build the FileItem, so you should always have the headers in question. > The reason for this request is that we have an application that is sending per-part headers (not precluded by the specs as far as we know of) to provide more information than name and content-type and using the FileUpload project means that we can no longer find out those header values. > [Also, not completely sure, but I believe FileUploadBase.createItem(Map, boolean) on line 480 is not referenced anymore in this project.] -- This message is automatically generated by JIRA. For more information on JIRA, see: http://www.atlassian.com/software/jira