IE SSL download problem

Free version of Xfilesharing

Moderator: admin

Message
Author
Bassman
Posts: 20
Joined: Sep 07, 2007 10:24 am
Location: UK

IE SSL download problem

#1 Postby Bassman » Oct 18, 2007 11:30 am

Hi guys,
Based on a recent experiance after doing a clean install of windows and ie7 etc, it would seem that ie has a problem downloading files over a ssl connection by default. When you try to download the file ie gives an error that it was unable to connect to the site or file. I made sure all windows and ie updates were up to date but the problem was still there.

The problem can be fixed by applying a patch to ie, which I have done and it all works ok now.

Is it possible to do anything on the script or server side of things to stop this happening so that the end user doesn't have to patch ie for ssl downloads?

Cheers

admin
Site Admin
Posts: 1784
Joined: Mar 22, 2006 12:32 pm

Re: IE SSL download problem

#2 Postby admin » Oct 18, 2007 12:02 pm

Bassman wrote:Hi guys,
Based on a recent experiance after doing a clean install of windows and ie7 etc, it would seem that ie has a problem downloading files over a ssl connection by default. When you try to download the file ie gives an error that it was unable to connect to the site or file. I made sure all windows and ie updates were up to date but the problem was still there.

The problem can be fixed by applying a patch to ie, which I have done and it all works ok now.

Is it possible to do anything on the script or server side of things to stop this happening so that the end user doesn't have to patch ie for ssl downloads?

Cheers



What was your IE version before and what is the current version? What is download linke you got error for?

Thanks

Bassman
Posts: 20
Joined: Sep 07, 2007 10:24 am
Location: UK

#3 Postby Bassman » Oct 18, 2007 4:49 pm

This problem can happen on all versions of IE explorer and is documented here:-

http://support.microsoft.com/kb/323308

This is the error I get after a fresh install of windows XP and Explorer 7
The same message on a different computer running Explorer 6. I have also tested it on 4 other machines where I know internet explorer has not been patched and the problem was on all of them.

Internet Explorer cannot download file from server.
Internet Explorer was not able to open this Internet site. The requested site is either unavailable or cannot be found. Please try again later.


It happens on all download links, if you take the (s) off the https:// it will download ok, so it is just the ssl download.

The registery patch I applied contains the folling info
REGEDIT4

[HKEY_LOCAL_MACHINE\Software\Microsoft\Windows\CurrentVersion\Internet Settings]
"DisableCachingOfSSLPages"=dword:00000000
"BypassSSLNoCacheCheck"=dword:00000001
"BypassHTTPNoCacheCheck"=dword:00000001
"SSLPragmaNoCache"=dword:00000001

This fixes the problem after it has been applied and the machine is rebooted on both IE 6 & 7

It is a bit of a strange one as I have had some users say that they have had no problems downloading files with explorer, when I ask if they have ever applied a patch, they answer no. But recently one of my users brought it to my attention which is why I started with a format and a fresh install of XP in order to test it from a default starting point.

Asking the end user to apply a patch that modifies their registery is something I would like to avoid at all costs if possible.

Hope this helps a bit

Many Thanks

ps: I am testing on IE7 V 7.0.5730.11
and IE6 V6.0.2900.2180.xpsp_2gdr.050301-1519

User avatar
PilgrimX182
Posts: 2181
Joined: Mar 22, 2006 1:39 pm
Location: UFO Lab
Contact:

#4 Postby PilgrimX182 » Oct 19, 2007 6:49 am

In index.cgi find line

Code: Select all

print"Cache-Control: no-cache, must-revalidate\n";

and add below

Code: Select all

print"Cache-Control: no-cache\n";
print"Cache-Control: no-store\n";


try to download after this change(if you have any other computer without fix)

If no help, try this: in upload.cgi find

Code: Select all

&UploadForm unless $ENV{REQUEST_METHOD} eq 'POST';

and comment it with '#'
then in Templates/download.html replace

Code: Select all

method="POST"

with

Code: Select all

method="GET" action="<TMPL_VAR site_url>"

Bassman
Posts: 20
Joined: Sep 07, 2007 10:24 am
Location: UK

#5 Postby Bassman » Oct 19, 2007 1:58 pm

Hi Pilgrim
Thanks for your help.

The first method made no difference.

The second method: I don't have the line in upload.cgi
&UploadForm unless $ENV{REQUEST_METHOD} eq 'POST';

I have a section like this

### Sending data with POST request if need
my $url_post = "$c->{site_url}/" || $ENV{HTTP_REFERER};
if($url_post)
{
if($url_post=~/\.htm(l|)$/i)
{
print"Content-type: text/html\n\n";
print"<HTML><HEAD><Script>parent.document.location='$url_post'</Script></HEAD></HTML>";
exit;
}
if($ENV{QUERY_STRING}!~/js_on=1/)
{
$url_post.='?';
$url_post.="\&$_->{name}=$_->{value}" for @har;
print $cg->redirect( $url_post );
exit;
}
push @har, { name=>'act', value=>'upload_result' };
print"Content-type: text/html\n\n";
print"<HTML><BODY><Form name='F1' action='$url_post' target='_parent' method='POST'>";
print"<textarea name='$_->{name}'>$_->{value}</textarea>" for @har;
print"</Form><Script>document.location='javascript:false';document.F1.submit();</Script></BODY></HTML>";
exit;
}

print"Content-type: text/html\n\n";
print"Upload complete.";

exit;

I am not sure what to change
Thanks for any further help in advance
Cheers

User avatar
PilgrimX182
Posts: 2181
Joined: Mar 22, 2006 1:39 pm
Location: UFO Lab
Contact:

#6 Postby PilgrimX182 » Oct 22, 2007 9:17 am

Oh, I'm sorry I told you wrong .cgi: should edit index.cgi not upload.cgi

One more change for index.cgi: remove this old line

Code: Select all

print"Cache-Control: no-cache, must-revalidate\n";

Bassman
Posts: 20
Joined: Sep 07, 2007 10:24 am
Location: UK

#7 Postby Bassman » Oct 22, 2007 11:53 am

Hi Pilgrim
Thanks again

I tried what you said and I am afraid both methods didn't work, however thanks to your guidance i think i might have come up with a solution that works..

I added extra \n on the line below and then commented out the 2 lines following it, in the original index.cgi

print"Content-length: $fsize\n\n";
#print"Cache-Control: no-cache, must-revalidate\n";
#print"Pragma: no-cache\n\n";

So we now are sending no cache settings?
This seems to have fixed the issue and works with the default settings in IE, but can you tell me if what I have done is ok or will have diverse effects somewhere else?

cheers

User avatar
PilgrimX182
Posts: 2181
Joined: Mar 22, 2006 1:39 pm
Location: UFO Lab
Contact:

#8 Postby PilgrimX182 » Oct 22, 2007 12:01 pm

Oh, interesting. Keep this if download works fine for you now, these headers are not really important.
Will apply this fix to next version.

IE is kinda mystery browser sometimes :)


Return to “XFileSharing Free”

Who is online

Users browsing this forum: No registered users and 0 guests