in reply to Re: CGI download filename weirdness
in thread CGI download filename weirdness

Thanks for the response. $pdffile is a path to the "physical" file, and $pdfid is the name of that file, without the extension.

I just tried pulling out this code into a separate script and giving these variables hard-coded values, and it works fine there, so it seems to be caused by something elsewhere than in the snippet I posted. This little PDF subroutine is part of a monstrous pile of code, thousands of lines long, and a real nightmare to debug.

A perhaps related issue is that on some browsers, the download never quite gets wrapped up properly - it gets left with a ".part" extension which needs to be removed manually in order to use an otherwise fine file.

Still digging away at this...

Replies are listed 'Best First'.
Re^3: CGI download filename weirdness
by kennethk (Abbot) on Feb 08, 2010 at 17:29 UTC
    I was trying to imply that $pdfid does not contain what you think it does. You should be able to do a simple file search for $pdfid to see where it was last modified. I highly doubt this is a browser issue.

      Well, replacing these variables with hard-coded values produces exactly the same effect, so that rules that one out. It seems the problem is definitely elsewhere in this pile'o'code. Thanks for the thoughts anyway.