Hello,
This is the same problem I had some time ago with PDF and SSL and of
course, with IE ...
And the solution was:
set cache control("")
* we 'love' IE *
regards,
r.
Begin forwarded message:
From: Raimon Fernandez <[email protected]>
Date: 23 de febrero de 2005 16:54:15 GMT+01:00
To: [email protected]
Subject: [Active4d-dev] PDF over SSL Error with Internet Explorer
Reply-To: Active4D Developer Discussion List <[email protected]
>
Hi !
We are serving some pdfs, in normal connection HTTP all runs
perfect, but when the connection is secured, HTTPS, our friend IE
doesn't want to download the file.
This problems only occurs in windows and with IE, with Opera,
Mozilla, ... all works as expected.
After making a google search, the result is awsome, but in resume ...
Problem:
----------------------
When opening a PDF over SSL running on IIS 5.1 (Windows XP
Professional, W2K Windows 2000, or Windows Server 2003), you may
receive the following problem with Internet Explorer.
First, instead of opening the PDF in Acrobat Reader, IE asks you,
"Do you want to open or save this file?". If you click "Open", then
you receive the error, "Internet Explorer cannot download file.pdf
from servername. Internet Explorer was not able to open this
Internet site. The requested site is unavailable or cannot be found.
Please try again later."
If you right-click on the link to the PDF, and select "Save", you
receive the following error: "Internet Explorer cannot download
file.pdf from servername. The file could not be written to the cache."
Cause:
----------------------------------
This problem occurs because the PDF returned by the web server
contains HTTP headers to disable caching. Specifically, the header
is the no-cache pragma. In VBScript ASP, the code lines that can
cause this error are:
Response.AddHeader "pragma","no-cache"
or
Response.CacheControl = "no-cache"
Solution:
------------------
Remove the above headers for disabling caching.
So, after reading againg the Active4D manual, I think I can do it
pretty easy, but ...
This is the response from the web server, with the file:
192.168.000.154.08080-192.168.000.004.03066: HTTP/1.0 200 OK
Server: 4D_WebStar_D/7.5
Cache-Control: no-cache
Pragma: no-cache
Expires: Wed, 23 Feb 2005 15:39:47 GMT
Content-Disposition: attachment; filename=RE001004.pdf
Content-Type: application/octet-stream
Date: Wed, 23 Feb 2005 15:39:47 GMT
Last-Modified: Wed, 23 Feb 2005 15:39:47 GMT
Content-Type: application/octet-stream
Content-Length: 51756
For what I read, I think just removing the Cache-Control: no-cache
and Pragma: no-cache should work, but ...
Here is the Active4D code ...
...
set response header("Content-Disposition"; "attachment; filename=" +
$docFileName)
delete response header("Pragma")
delete response header("Cache-Control")
set content type("application/octet-stream")
write blob($blob_file; "application/octet-stream")
...
This doesn't work ...
I read or tried to read the RFC 2616, section 14.9, but ...
Are the response header names wrong ?
This should work ?
Thanks again for your help!
Regards,
Raimon Fernandez
Barcelona, Spain
_______________________________________________
Active4D-dev mailing list
[email protected]
http://mailman.aparajitaworld.com/mailman/listinfo/active4d-dev
Archives: http://mailman.aparajitaworld.com/archive/active4d-dev/
On 16/09/2009, at 16:33, Mike Vogt wrote:
It turns out that IE can't correctly access Office documents from a
secure
site! This problem does not exist in Firefox, Opera, or Safari.
The work
around is that the cache must be enabled for that request. Adding
set cache
control("Cache-Control: max-age=120, must-revalidate") just before
the set
content type("application/vnd.ms-excel") fixed the problem. The
following
Microsoft knowledgebase article documents the problem and the
solution.
http://support.microsoft.com/kb/316431
Thanks,
Mike
-----Original Message-----
From: [email protected]
[mailto:[email protected]] On Behalf Of
Michael Bond
Sent: Wednesday, September 16, 2009 9:43 AM
To: [email protected]
Subject: Re: [Active4d-dev] HTTPS in HTTP out
2009/9/16 Mike Vogt <[email protected]>
Hi all,
This might not be an Active4D question, but I'll ask
anyway. I have a
fuseaction that set content type("application/vnd.ms-excel") that
worked great, asking the browser user if they wanted to
open in excel, etc.
However, last night, we mad the entire site secure, so all urls are
forced to https if they are http, using Apache rewrite in
from of 4D
Server (we've always used Apache rewrite, just not for
https). Now,
all the excel links give an error saying 'Could not open
'https://www.willsub.com/index...
My question is, is there a response header or other info I
can set so
that the response is set back to http from https? Is there
any other
way to look at this problem?
TIA,
Sincerely,
Mike Vogt
Willsub Technical Support
I'll be honest I don't really understand the problem but if
you need a
secure request to be "transformed" under a certain rule set
to a standard non-secure then you could simply use a Redirect
from within Apache or Active4D to the non-secure pages with
the original request parameters attached to the Redirect.
Michael Bond
Michael
_______________________________________________
Active4D-dev mailing list
[email protected]
http://mailman.aparajitaworld.com/mailman/listinfo/active4d-dev
Archives: http://mailman.aparajitaworld.com/archive/active4d-dev/
_______________________________________________
Active4D-dev mailing list
[email protected]
http://mailman.aparajitaworld.com/mailman/listinfo/active4d-dev
Archives: http://mailman.aparajitaworld.com/archive/active4d-dev/
_______________________________________________
Active4D-dev mailing list
[email protected]
http://mailman.aparajitaworld.com/mailman/listinfo/active4d-dev
Archives: http://mailman.aparajitaworld.com/archive/active4d-dev/