perl-asp mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Marko Friedemann <...@bmx-chemnitz.de>
Subject Re: Problem with PDF files
Date Tue, 26 Apr 2005 07:48:11 GMT
Jonathan Dixon wrote:

>> This declares *.pdf files as being ASP files.  Apache::ASP is
>> trying to interpret them directly!
>> 
>> What you want to do cannot be accomplished with this mechanism.
>> Try looking at the various Apache modules.
> 
> I understand that this forces the PDF files to be handled through
> Apache::ASP. But shouldn't the Script_OnStart section in the
> global.asa file short-circuit the processing of the file itself and
> send it out as a straight binary file?  This is what seems to happen
> for the Word files in the directory that are treated the same way.
> 
> Do you (or anyone else) have suggestions for modules to look at that
> can check for a valid ASP session before allowing access to files on
> the server?

I would attempt this a bit differently. Instead of referencing the file 
directly and inject the code voodoo-like, how about you use a dedicated 
download script, hide it behind a plain name of download with the 
handler settings and then use $PATHINFO to get to the requested file, 
which can then be located elsewhere, too.

This is how this would look for the user:
  http://foo.bar/download/file.ext

where download is the name for your download script which then gets 
"file.ext" (or "/file.ext", I am unsure right now) as $PATHINFO which 
you can then use to retrieve the file from the real location to which 
you can apply more restrictive access rights, too, as additional benefit.

regards,
Marko

---------------------------------------------------------------------
To unsubscribe, e-mail: asp-unsubscribe@perl.apache.org
For additional commands, e-mail: asp-help@perl.apache.org


Mime
View raw message