Forum: Ruby on Rails Can Ruby do this?

Announcement (2017-05-07): www.ruby-forum.com is now read-only since I unfortunately do not have the time to support and maintain the forum any more. Please see rubyonrails.org/community and ruby-lang.org/en/community for other Rails- und Ruby-related community platforms.
Vu N. (Guest)
on 2006-02-02 10:31
It may sound very simple:
1. When a user request some file, the program should authorize him
2. Then we send the file location to the browser/download manager so it
can begin to download. (something equilvalent to PHP header ("Location:
XXX")
3. Do something else before we stop the script.

The hardest part is the 3rd one, when we send back the header the script
will stopp too. I was thinking if we can just call another script right
before we send back the header, but there is a flaw in that algorithm :(
Mikkel B. (Guest)
on 2006-02-02 11:16
vu nguyen wrote:
> It may sound very simple:
> 1. When a user request some file, the program should authorize him
> 2. Then we send the file location to the browser/download manager so it
> can begin to download. (something equilvalent to PHP header ("Location:
> XXX")
> 3. Do something else before we stop the script.
>
> The hardest part is the 3rd one, when we send back the header the script
> will stopp too. I was thinking if we can just call another script right
> before we send back the header, but there is a flaw in that algorithm :(

What are you trying to accomplish with this?

Mikkel
Vu N. (Guest)
on 2006-02-04 07:39
Mikkel B. wrote:
> vu nguyen wrote:
>> It may sound very simple:
>> 1. When a user request some file, the program should authorize him
>> 2. Then we send the file location to the browser/download manager so it
>> can begin to download. (something equilvalent to PHP header ("Location:
>> XXX")
>> 3. Do something else before we stop the script.
>>
>> The hardest part is the 3rd one, when we send back the header the script
>> will stopp too. I was thinking if we can just call another script right
>> before we send back the header, but there is a flaw in that algorithm :(
>
> What are you trying to accomplish with this?
>
> Mikkel

I was thinking of delete .htaccess. allow user to download, the re-write
it. Err, but it's silly anyway, I chose just to read the file and send.
This topic is locked and can not be replied to.