Beefy Boxes and Bandwidth Generously Provided by pair Networks
Pathologically Eclectic Rubbish Lister
 
PerlMonks  

IE 6 PDF creation on secure pages

by screamingeagle (Curate)
on Jun 28, 2002 at 01:52 UTC ( [id://177906]=perlquestion: print w/replies, xml ) Need Help??

screamingeagle has asked for the wisdom of the Perl Monks concerning the following question:

I've been banging my head on this wall for almost 4 hours now; anyway, here's the problem : I have a perl script on my website (which has SSL on it) which creates a dynamic PDF file and displays the OPEN/SAVE dialog box (when viewed in IE 6),so that the user can either view or download the PDF file .

now when i execute the script by pointing IE 6 to , for example, http://testsite.com/script.cgi, the script runs fine and displays the OPEN/SAVE dialog box, and i'm able to open the PDF page directly in the browser or, if i choose to, save the PDF file to my hard disk...

BUT, if go the same URL,except now i add the 's' to 'http' , like 'https://testsite.com/script.cgi', the browser tries to download the page instead of displaying the OPEN/SAVE browser dialog box...

here are the headers i'm printing out :
if ($internet_explorer) { $header_data = "file;"; } $header_data .= "filename=$filename\n"; print "Content-Type: application/pdf;filename=$filename\n"; print "Content-Disposition: $header_data"; print "Content-Length: " . length($msg) . "\n"; print $PDFdata;
what am i missing here ...? and why would it work on a non-secure url and not work for a secure URL (and i checked, SSL is correctly installed on the site)

Replies are listed 'Best First'.
Re: IE 6 PDF creation on secure pages
by BrowserUk (Patriarch) on Jun 28, 2002 at 02:11 UTC

    If the server is IIS running on Win2K, then this could be the source of yor problem. There appears to be some bug in IIS sp2 that causes it to corrupt content disposition headers when delivering them via ssl (https:).

    I had a similar problem (from the client side) with this. I haven't seen a fix for it but haven't looked that hard as it was not my server having the problem.

    Hope this helps.

      The platform i'm running the code is :
      Server : Red Hat Linux 7.0
      Web Server : Apache 1.3.26
      SSL : Open-SSL 0.9.6c
      Perl : 5.6.1

        I was no help then, sorry. Sounded awefully similar to the problem I had.

Re: IE 6 PDF creation on secure pages
by grantm (Parson) on Jun 28, 2002 at 10:50 UTC

    1. You could try 'curl' from the command line with -D to dump the headers:

    curl -D - url?querystring

    2. I had a problem with IE refusing to display a PDF that had a 'Cache-control: no-store' header.

    3. You might also want to disable 'byte serving' with the 'Accept-Ranges:' header.

    4. Good luck

Log In?
Username:
Password:

What's my password?
Create A New User
Domain Nodelet?
Node Status?
node history
Node Type: perlquestion [id://177906]
Approved by MrNobo1024
help
Chatterbox?
and the web crawler heard nothing...

How do I use this?Last hourOther CB clients
Other Users?
Others avoiding work at the Monastery: (2)
As of 2024-04-25 05:45 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found