Re: File download doesn't work with SSL
| From: | 1LT John W. Holmes | Date: | Mon, 07 Oct 2002 21:42:15 +0000 |
| Subject: | Re: File download doesn't work with SSL | ||
| References: | 1 2 3 4 5 | Groups: | php.general |
| Request: | Send a blank email to php-general+get-119141@lists.php.net to get a copy of this message | ||
Thanks for the help, but why would this problem only come into play when I'm
trying to force the download of a file? All of the other SSL pages come up
fine, I just can't send the attachment headers to force the download of a
file.
I'm going to mess with IIS and see if I can force it to use HTTP 1.0. Also,
SP2 for IE6 is supposed to correct this problem, I'll have to try that,
also. I'd rather not have to update a couple hundred computers, though. :)
---John Holmes...
----- Original Message -----
From: "Rouvas Stathis" <rouvas@di.uoa.gr>
To: "1LT John W. Holmes" <holmes072000@charter.net>;
<php-general@lists.php.net>
Sent: Monday, October 07, 2002 4:06 PM
Subject: Re: [PHP] File download doesn't work with SSL
> John, more info:
>
>
> <URL:http://support.microsoft.com/default.aspx?scid=KB;EN-US;Q187504&>
>
> -Stathis.
>
> Rouvas Stathis wrote:
> >
> > John,
> >
> > sorry, don't know zip about IIS.
> > I got the info from
> >
> > <URL:http://www.squirrelmail.org/wiki/InternetExplorerVersusSSL>
> > though.
> > Maybe they have more to say...
> >
> > -Stathis.
> >
> > "1LT John W. Holmes" wrote:
> > >
> > > Stathis,
> > >
> > > Thanks for the tip. Any idea how to fix IIS regarding this issue?
> > >
> > > ---John Holmes...
> > >
> > > ----- Original Message -----
> > > From: "Rouvas Stathis" <rouvas@di.uoa.gr>
> > > To: <php-general@lists.php.net>
> > > Cc: "1LT John W. Holmes" <holmes072000@charter.net>
> > > Sent: Monday, October 07, 2002 2:00 PM
> > > Subject: Re: [PHP] File download doesn't work with SSL
> > >
> > > > John,
> > > >
> > > > problem is broken HTTP/1.1 implementation of Internet Exploder.
> > > > Make your server downgrade to HHTP/1.0.
> > > > e.g. for apache:
> > > >
> > > > <example>
> > > > <IfModule mod_setenvif.c>
> > > >
> > > > #
> > > > # The following directives modify normal HTTP response behavior.
> > > > # The first directive disables keepalive for Netscape 2.x and
> > > > browsers that
> > > > # spoof it. There are known problems with these browser
> > > > implementations.
> > > > # The second directive is for Microsoft Internet Explorer 4.0b2
> > > > # which has a broken HTTP/1.1 implementation and does not
properly
> > > > # support keepalive when it is used on 301 or 302 (redirect)
> > > > responses.
> > > > #
> > > > BrowserMatch "Mozilla/2" nokeepalive
> > > > BrowserMatch "MSIE" nokeepalive downgrade-1.0 force-response-1.0
> > > >
> > > > #
> > > > # The following directive disables HTTP/1.1 responses to
browsers
> > > > which
> > > > # are in violation of the HTTP/1.0 spec by not being able to
grok a
> > > > # basic 1.1 response.
> > > > #
> > > > BrowserMatch "RealPlayer 4\.0" force-response-1.0
> > > > BrowserMatch "Java/1\.0" force-response-1.0
> > > > BrowserMatch "JDK/1\.0" force-response-1.0
> > > >
> > > > </IfModule>
> > > > </example>
> > > >
> > > > copy BrowserMatch line in SSL virtual server section too.
> > > >
> > > > -Stathis.
> > > >
> > > > Rasmus Lerdorf wrote:
> > > > >
> > > > > Nope, PHP does not send that.
> > > > >
> > > > > On Mon, 7 Oct 2002, 1LT John W. Holmes wrote:
> > > > >
> > > > > > I believe in miracles. I have searched Microsoft and the first
link
> > > was
> > > > > > actually related to my problem...
> > > > > >
> > > > > > Okay, I found an IE issue where downloads over SSL will choke
when you
> > > send
> > > > > > a no-cache header. It says to use a no-store cache-control
header,
> > > instead.
> > > > > > I tried this:
> > > > > >
> > > > > > header("cache-control: no-store");
> > > > > > header("content-type: application/vnd.ms-excel;
name='excel'");
> > > > > > header("content-disposition: attachment; filename=" .
$filename .
> > > > > > ".xls");
> > > > > >
> > > > > > and I'm still getting the same thing. Is the no-cache
cache-control
> > > header
> > > > > > sent automatically by PHP at all? I don't have one set
explicitly in
> > > my
> > > > > > code.
> > > > > >
> > > > > > Any help is appreciated.
> > > > > >
> > > > > > ---John Holmes...
> > > > > >
> > > > > > ----- Original Message -----
> > > > > > From: "Rasmus Lerdorf" <rasmus@php.net>
> > > > > > To: "1LT John W. Holmes" <holmes072000@charter.net>
> > > > > > Cc: <php-general@lists.php.net>
> > > > > > Sent: Monday, October 07, 2002 10:08 AM
> > > > > > Subject: Re: [PHP] File download doesn't work with SSL
> > > > > >
> > > > > >
> > > > > > > Does it work with a different browser? Smells like an IE bug
to me.
> > > > > > >
> > > > > > > On Mon, 7 Oct 2002, 1LT John W. Holmes wrote:
> > > > > > >
> > > > > > > > Everyone,
> > > > > > > >
> > > > > > > > I've had a simple download script working where a user
> > > > > > > > would
click
> > > on a
> > > > > > link and the program would send word or excel headers instead of
HTML.
> > > The
> > > > > > file would then be opened in the appropriate program and the
user
> > > could
> > > > > > save/edit it.
> > > > > > > >
> > > > > > > > Now that we've loaded everything under SSL, it
> > > > > > > > doesn't work.
> > > > > > > >
> > > > > > > > Here are the headers I send:
> > > > > > > >
> > > > > > > > header("content-type: application/vnd.ms-excel;
> > > name='excel'");
> > > > > > > > header("content-disposition: attachment;
> > > > > > > > filename=" .
> > > $filename .
> > > > > > ".xls");
> > > > > > > >
> > > > > > > > Now, the pages in question are just regular HTML tables. If
there
> > > is a
> > > > > > export2=excel in the URL, then these two additional headers will
be
> > > sent.
> > > > > > The dialog to save/open the file pops up, but when you try to
> > > open/save the
> > > > > > file, IE says it cannot be found. If I put in a echo before
these two
> > > > > > headers (or comment them out), the page is shown correctly as
HTML, so
> > > the
> > > > > > code is correct.
> > > > > > > >
> > > > > > > > Are there any special headers I have to send to enable this
file
> > > > > > download while under SSL, or is it something else I'm
overlooking?
> > > > > > > >
> > > > > > > > Thanks for any help.
> > > > > > > >
> > > > > > > > ---John Holmes...
> > > > > > >
> > > > > >
> > > > >
> >
> > --
> > Rouvas Stathis
> > rouvas@di.uoa.gr
> > http://www.di.uoa.gr/~rouvas
> >
> > --
> > PHP General Mailing List (http://www.php.net/)
> > To unsubscribe, visit: http://www.php.net/unsub.php
>
> --
> Rouvas Stathis
> rouvas@di.uoa.gr
> http://www.di.uoa.gr/~rouvas