Loading ...
Sorry, an error occurred while loading the content.

2003Re: Problem with PDF files

Expand Messages
  • Marko Friedemann
    Apr 26, 2005
      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:

      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.


      To unsubscribe, e-mail: asp-unsubscribe@...
      For additional commands, e-mail: asp-help@...
    • Show all 5 messages in this topic