Return-Path: Delivered-To: apmail-commons-user-archive@www.apache.org Received: (qmail 93884 invoked from network); 8 Mar 2008 00:05:54 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (140.211.11.2) by minotaur.apache.org with SMTP; 8 Mar 2008 00:05:54 -0000 Received: (qmail 96604 invoked by uid 500); 8 Mar 2008 00:05:46 -0000 Delivered-To: apmail-commons-user-archive@commons.apache.org Received: (qmail 96539 invoked by uid 500); 8 Mar 2008 00:05:46 -0000 Mailing-List: contact user-help@commons.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: "Jakarta Commons Users List" Delivered-To: mailing list user@commons.apache.org Received: (qmail 96530 invoked by uid 99); 8 Mar 2008 00:05:46 -0000 Received: from nike.apache.org (HELO nike.apache.org) (192.87.106.230) by apache.org (qpsmtpd/0.29) with ESMTP; Fri, 07 Mar 2008 16:05:46 -0800 X-ASF-Spam-Status: No, hits=-0.0 required=10.0 tests=SPF_HELO_PASS,SPF_PASS X-Spam-Check-By: apache.org Received-SPF: pass (nike.apache.org: domain of gcjcu-commons-user@m.gmane.org designates 80.91.229.2 as permitted sender) Received: from [80.91.229.2] (HELO ciao.gmane.org) (80.91.229.2) by apache.org (qpsmtpd/0.29) with ESMTP; Sat, 08 Mar 2008 00:04:58 +0000 Received: from list by ciao.gmane.org with local (Exim 4.43) id 1JXmYq-0002C2-8m for user@commons.apache.org; Sat, 08 Mar 2008 00:05:12 +0000 Received: from dsl-240-130-73.telkomadsl.co.za ([41.240.130.73]) by main.gmane.org with esmtp (Gmexim 0.1 (Debian)) id 1AlnuQ-0007hv-00 for ; Sat, 08 Mar 2008 00:05:12 +0000 Received: from sabob1 by dsl-240-130-73.telkomadsl.co.za with local (Gmexim 0.1 (Debian)) id 1AlnuQ-0007hv-00 for ; Sat, 08 Mar 2008 00:05:12 +0000 X-Injected-Via-Gmane: http://gmane.org/ To: user@commons.apache.org From: bob Subject: Re: [FileUpload] Safe to continue parsing after SizeLimitExceededException Date: Sat, 08 Mar 2008 02:05:02 +0200 Lines: 30 Message-ID: References: Mime-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit X-Complaints-To: usenet@ger.gmane.org X-Gmane-NNTP-Posting-Host: dsl-240-130-73.telkomadsl.co.za User-Agent: Thunderbird 2.0.0.12 (Windows/20080213) In-Reply-To: Sender: news X-Virus-Checked: Checked by ClamAV on apache.org Having looked into this I think I can answer my own questions now. For the benefit of others I will answer them here ;-) bob wrote: > I have two related questions: > > #1 Will I encounter any problems if I override the > FileUploadBase#parseRequest(..) method and continue parsing the request > after an exception is raised? Meaning I continue iterating and > extracting the remaining request items. Yes you will have problems. Since FileUpload v1.2.1 the request#inputStream is closed when a FileSizeLimitExceededException is thrown. FileItemIterator can't parse any more items once the stream is closed. > > #2 Are form fields parsed before the actual files are parsed? Meaning if > an exception is raised during my custom FileUploadBase#parseRequest > method can I just grab all the FileItem instances already created at > that point and just exit the method, knowing all form fields are > available. Or should I continue parsing the request and do the check > fileItem#isFormField? > No the order of the items are as they appear on the HTML Form. kind regards bob --------------------------------------------------------------------- To unsubscribe, e-mail: user-unsubscribe@commons.apache.org For additional commands, e-mail: user-help@commons.apache.org