[prev in list] [next in list] [prev in thread] [next in thread] 

List:       mason
Subject:    Re: [Mason] File uploads
From:       "P. Fleury" <fleury () users ! sourceforge ! net>
Date:       2004-04-03 19:49:59
Message-ID: 406F1B15.4010802 () users ! sourceforge ! net
[Download RAW message or body]



Joe Landman wrote:

>On Sat, 2004-04-03 at 11:26, Dave Rolsky wrote:
>  
>
>
>Page 169 (near the top) suggests that file uploads persist in memory. 
>If this is the case, and there is no way to flush/recover the memory,
>then it would be better to use the CGI.pm.  The argument made in the
>paragraph is that the extra delay for CGI.pm is small compared to the
>benefits of not grabbing/holding memory.
>
>The context of this section was where you would like to use CGI over
>mod_perl.  This is the beginning of chapter 9.
>
>Thanks!
>  
>
Hi Joe,

Well, it does not mention CGI.pm, but only CGI. It refers to the fact 
that CGI spawns a new process for each request, and this memory is then 
recovered when the process ends, i.e. when the request is over. This is 
not the case for mod_perl, hence the increase in speed of the latter. 
That does *not* mean you have to use CGI.pm :-)
You could configure Apache to spawn a new process for your upload 
component (named *_upload.html), with a handler.cgi as on page 171, and 
the Apache configuration like on page 170, with a <FilesMatch 
"_upload\.html$"> instead. Only problems you may encounter is if your 
site uses $r and many of its methods, as only a few are actually 
emulated in the Mason CGIHandler.

--pascal





-------------------------------------------------------
This SF.Net email is sponsored by: IBM Linux Tutorials
Free Linux tutorial presented by Daniel Robbins, President and CEO of
GenToo technologies. Learn everything from fundamentals to system
administration.http://ads.osdn.com/?ad_id=1470&alloc_id=3638&op=click
_______________________________________________
Mason-users mailing list
Mason-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/mason-users
[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic