|
sending large files via mason: msg#00263web.mason.user
In order to protect certain files that require a valid login cookie to get them, I have a Mason component that checks for the cookie and sends large files to the browser. I use a basic read loop to send the file a bunch of chunks at a time: open (FILE, "/some/path"); my $buf; while (read(FILE, $buf, 16384)) { $m->out($buf); } close(FILE); I've got a front/back reverse proxy in place, but still the Apache/mod_perl child running the component is tied up for a bit while the file is read in and spit back out. Is there a better way to do this? I'm also running into "exit signal Alarm clock" messages in the errorlog and incomplete file transfers when several requests are being made; I wonder if what I'm doing is contributing to the problem. If you have any suggestions for better ways to "cookie-protect" a file with Mason (or without Mason on the reverse-proxy front server), I'd love to hear about them. -- Jase P Wells .:. jase@xxxxxxxxx ------------------------------------------------------- This sf.net email is sponsored by:ThinkGeek Welcome to geek heaven. http://thinkgeek.com/sf |
|
| <Prev in Thread] | Current Thread | [Next in Thread> |
|---|---|---|
| Previous by Date: | Re: Stylesheets for the error display?: 00263, Jonathan Swartz |
|---|---|
| Next by Date: | Re: subroutines: 00263, Dave Rolsky |
| Previous by Thread: | Stylesheets for the error display?i: 00263, Pascal Eeftinck |
| Next by Thread: | Wierd Mason 1.22 problem: 00263, David @ Simply Site Hosting |
| Indexes: | [Date] [Thread] [Top] [All Lists] |
| News | FAQ | advertise |