Return-Path: Delivered-To: apmail-httpd-apreq-dev-archive@www.apache.org Received: (qmail 3503 invoked from network); 17 Jun 2004 17:57:54 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (209.237.227.199) by minotaur-2.apache.org with SMTP; 17 Jun 2004 17:57:54 -0000 Received: (qmail 46448 invoked by uid 500); 17 Jun 2004 17:58:10 -0000 Delivered-To: apmail-httpd-apreq-dev-archive@httpd.apache.org Received: (qmail 46303 invoked by uid 500); 17 Jun 2004 17:58:09 -0000 Mailing-List: contact apreq-dev-help@httpd.apache.org; run by ezmlm Precedence: bulk List-Post: List-Help: List-Unsubscribe: List-Subscribe: Delivered-To: mailing list apreq-dev@httpd.apache.org Received: (qmail 46253 invoked by uid 99); 17 Jun 2004 17:58:08 -0000 Received: from [80.91.224.249] (HELO main.gmane.org) (80.91.224.249) by apache.org (qpsmtpd/0.27.1) with ESMTP; Thu, 17 Jun 2004 10:58:08 -0700 Received: from list by main.gmane.org with local (Exim 3.35 #1 (Debian)) id 1Bb190-00081c-00 for ; Thu, 17 Jun 2004 19:57:46 +0200 Received: from adsl-34-76-42.mia.bellsouth.net ([67.34.76.42]) by main.gmane.org with esmtp (Gmexim 0.1 (Debian)) id 1AlnuQ-0007hv-00 for ; Thu, 17 Jun 2004 19:57:46 +0200 Received: from joe+gmane by adsl-34-76-42.mia.bellsouth.net with local (Gmexim 0.1 (Debian)) id 1AlnuQ-0007hv-00 for ; Thu, 17 Jun 2004 19:57:46 +0200 X-Injected-Via-Gmane: http://gmane.org/ Mail-Followup-To: apreq-dev@httpd.apache.org To: apreq-dev@httpd.apache.org From: Joe Schaefer Subject: Re: Apache::Upload API Date: 17 Jun 2004 13:57:42 -0400 Lines: 35 Message-ID: <87r7sexe21.fsf@gemini.sunstarsys.com> References: <87659qz4gv.fsf@gemini.sunstarsys.com> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Complaints-To: usenet@sea.gmane.org X-Gmane-NNTP-Posting-Host: adsl-34-76-42.mia.bellsouth.net Mail-Copies-To: never User-Agent: Gnus/5.09 (Gnus v5.9.0) Emacs/21.2 Sender: news X-Virus-Checked: Checked X-Spam-Rating: minotaur-2.apache.org 1.6.2 0/1000/N Joe Schaefer writes: [...] > > When I last looked at the apreq2 source a few months ago, I was under > > the impression that the code stores small uploads in memory, and only > > writes them into spool files from a certain size upwards. Which might be > > the reason why the filename() and fh() methods are not available > > anymore. But it seemed to me that to provide link(), the code does > > create files for smaller uploads when required. Couldn't this also be > > done to provide filename() and fh() again? > > I'd *really* prefer to stay out of the IO game in Apache::Request > (moving filehandles between apache and perl is a gigantic mess). > I'd rather argue for some sort of brigade-as-filehandle mechanism > in APR::Brigade, precisely for the backwards-compatibility + > interoperability reasons above. Sorry, let me try to sound a little more positive. To take your points in order: 1) Yes, you are correct that apreq2 does not do IO on smallish uploads, but link() will induce a write-to-file. What this code could easily be reused for is to transform the bucket brigade to an apr_file_t pointer on demand. But then how should we expose that pointer back to perl- APR::PerlIO? How portable is APR::PerlIO? Would we need the old dup() cruft from apreq1? Stas, Geoff? 2) filename() just needs be written (remember it's the client-reported filename buried in the Content-Disposition header). It's easy to implement now, just nobody has bothered to do it yet. That definitely that will be resolved before 2.04-dev. -- Joe Schaefer