SibSoft Ltd.
Development Services
software products
 RegisterRegister    SearchSearch   ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 
EZYWebhost - Cheap XUpload & XFileSharing 100% campatible hosting

AJAX upload progress bar

File sharing script
IE SSL download problem

 
Post new topic   Reply to topic    SibSoft Ltd Forum Index -> XFileSharing
View previous topic :: View next topic  
Author Message
Bassman



Joined: 07 Sep 2007
Posts: 18
Location: UK

PostPosted: Oct 18, 2007 11:30 am    Post subject: IE SSL download problem Reply with quote

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
Back to top
View user's profile Send private message
admin
Site Admin


Joined: 22 Mar 2006
Posts: 130

PostPosted: Oct 18, 2007 12:02 pm    Post subject: Re: IE SSL download problem Reply with quote

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
Back to top
View user's profile Send private message Send e-mail
Bassman



Joined: 07 Sep 2007
Posts: 18
Location: UK

PostPosted: Oct 18, 2007 4:49 pm    Post subject: Reply with quote

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
Back to top
View user's profile Send private message
PilgrimX182



Joined: 22 Mar 2006
Posts: 1107
Location: Undisclosed location

PostPosted: Oct 19, 2007 6:49 am    Post subject: Reply with quote

In index.cgi find line
Code:
print"Cache-Control: no-cache, must-revalidate\n";

and add below
Code:
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:
&UploadForm unless $ENV{REQUEST_METHOD} eq 'POST';

and comment it with '#'
then in Templates/download.html replace
Code:
method="POST"

with
Code:
method="GET" action="<TMPL_VAR site_url>"
Back to top
View user's profile Send private message Visit poster's website AIM Address
Bassman



Joined: 07 Sep 2007
Posts: 18
Location: UK

PostPosted: Oct 19, 2007 1:58 pm    Post subject: Reply with quote

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
Back to top
View user's profile Send private message
PilgrimX182



Joined: 22 Mar 2006
Posts: 1107
Location: Undisclosed location

PostPosted: Oct 22, 2007 9:17 am    Post subject: Reply with quote

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:
print"Cache-Control: no-cache, must-revalidate\n";
Back to top
View user's profile Send private message Visit poster's website AIM Address
Bassman



Joined: 07 Sep 2007
Posts: 18
Location: UK

PostPosted: Oct 22, 2007 11:53 am    Post subject: Reply with quote

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
Back to top
View user's profile Send private message
PilgrimX182



Joined: 22 Mar 2006
Posts: 1107
Location: Undisclosed location

PostPosted: Oct 22, 2007 12:01 pm    Post subject: Reply with quote

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 Smile
Back to top
View user's profile Send private message Visit poster's website AIM Address
Display posts from previous:   
Post new topic   Reply to topic    SibSoft Ltd Forum Index -> XFileSharing All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum


Powered by phpBB © 2001, 2005 phpBB Group