download glitches on .gz files

OK, here's the deal: I help take care of a website at http://www.dragondata.com/~storm/ . The site has a files page where users can download files, mostly in .gz format.
The problem is when the files are downloaded in Win95 and unzipped with WinZip they are corrupted. If I telnet to the shell and gunzip them there they are fine. I have used Winzip for files in this format from other sites many times, no problem. I have tried uploading the files in ascii, binary, and auto modes, same result.
capttomAsked:
Who is Participating?
I wear a lot of hats...

"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.

bigelosCommented:
What version of Winzip are you using?  I have Winzip v6.3 with Win95 and the file http://www.dragondata.com/~storm/files/flud501e_tcl_tar.gz downloaded, unzipped, and untarred just fine.  (At least, I was able to read the file fluid.txt.)

Wait!  I just downloaded http://www.dragondata.com/~storm/files/newhide_tcl.gz and the file was somewhat like you said in that the file looked like it was all garbled when viewed in Notepad.  However, when viewed in Winword, it looks fine.  One difference is that this file was not tarred, but I don't think that is what the problem is.

The problem is the difference between unix and DOS/Win95/NT.  Unix handles end-of-line characters differently than DOS.  That is why these files look good in unix and not Win95.  You will notice that when you upload a file to unix, you get all those ^M characters?  DOS adds these, unix doesn't use them.  It shouldn't screw up your scripts, though.
0
bigelosCommented:
You need to decide if you want to view the files on a unix system, or on a DOS based system.  The easiest way to do this is create the file on the operating system that you want it viewed on, and by default it should look fine.  There are a few utilities like dos2unix and unix2dos that will strip/add line feeds depending on the conversion.  I have these utilities for unix, but not for DOS.  You can find them at http://kanga.unixnet.org/~bigelos/bin

I am sure that the DOS versions also exist, but I don't use them because Winword will also do the conversions, so I just use it.
0
capttomAuthor Commented:
Well, thats what I thought too at first... Except for this: Let's take a specific example, "facelift3_0_tcl.gz". When you download it from my site two things happen (to me at least), first, if I just click on the link I get a page of binary code in my browser, if I shift/click I get the download but its trashed. Now, let's go to the original source where I got the file, ftp://ftp.sodre.net/pub/eggdrop/scripts1.3/facelift3_0_tcl.gz .
When I download from here (notice ftp protcol instead of http) I just click (no shift) and I get the file perfectly. Opened with WinZip 6.3 (SR-1) and viewed with notepad (or Programmer's Text Editor) both times. It must be something to do with the protocol. Odd though, on my page regular .zip files come through fine.
0
Introducing Cloud Class® training courses

Tech changes fast. You can learn faster. That’s why we’re bringing professional training courses to Experts Exchange. With a subscription, you can access all the Cloud Class® courses to expand your education, prep for certifications, and get top-notch instructions.

bigelosCommented:
What browser are you using?
0
bigelosCommented:
I am using same version of Winzip...  I downloaded the facelift file using both GetRight (www.getright.com) and Netscape's built-in download interface.  (Tried both the shift method and the right-click method.)  File looked fine, except for, of course, the missing line breaks.

BTW:  Cool applet on your homepage!
0
capttomAuthor Commented:
Browser is Netscape 4.04. Have also had complaints from other site users on this. I know this involves the ftp vs http protocol thing somehow, just not sure how :(

The Lake Applet is freeware and can be had at http://www.demon.co.uk/davidg/ (click "java" button)
0
bigelosCommented:
I have just confirmed that the problem is with Netscape.  I tried Netscape 4.0x and got that exact problem you have had.  (garbage characters).  I then tried Netscape 3.0x Gold with no problems at all.  I would highly recommend that you use GetRight (www.getright.com) if you are going to use Netscape 4.0x.  It has a nice interface, and it captures clicks in Netscape, so you hardly know it is there.  I used it to download the file with no problem.  (Checked the entire file, this time.)  GetRight also supports resuming (starts back up where left off if connection is broken.)

I noticed that the tarred files did not exhibit the problem--maybe you should tar them first?  Anyway, Netscape 4.0x is the culprit here.
0

Experts Exchange Solution brought to you by

Your issues matter to us.

Facing a tech roadblock? Get the help and guidance you need from experienced professionals who care. Ask your question anytime, anywhere, with no hassle.

Start your 7-day free trial
capttomAuthor Commented:
OK, now I'm really confused :(( My idea about the ftp protocol just went out the window. Here's an example:
the file "flud501e_tcl_tar.gz"
From my site (http://www.dragondata.com/~storm/files/flud501e_tcl_tar.gz ), you have to shift/click to get it, then its trashed. From http://www.xcalibre.com/eggdrop/tclflud501e_tcl_tar.gz
it downloads without holding shift and opens perfectly. Same file, same attributes, same browser, same viewer. WTF?
0
bigelosCommented:
Just checked with Internet Explorer 3.x and the file looked fine as well.
0
capttomAuthor Commented:
I agree its in the browser. Win-Download gets it fine, IE 4.01 won't get it at all, just flashes something so fast I can't read it and quits trying, Netscape 3.04 says "warning unrecognized encoding gzip" then crashes. Why does  this work from other sites and not mine?
0
bigelosCommented:
One final fix that you can try:  Instead of using a http link, why don't you just link to the ftp server?

Just read your comment above-- I'm fresh out of ideas.  Maybe it is your server?  I thought it was really weird that Netscape wouldn't start up the helper app for x-gzip files.

I just looked at my GetRight log file and noticed that GetRight had to ask for the file 5x before it came across OK.  Sounds more and more like server problems.

OK, here is one more thing you can try:  UUencode the gzipped file on your HD, transfer it in ascii format, then uudecode it.  (Or leave it uuencoded and see how it downloads.  I'm pretty sure WinZip can handle uuencoded OK.)
0
capttomAuthor Commented:
I need it so the majority of users (read anyone) can get it. You may be right about the server. Thanks for your help.
0
bigelosCommented:
I just uploaded the facelift file to my web server (kanga.unixnet.org/~bigelos/bin).  Transferred as binary file.  Set the permissions to read only for everyone.

Downloads OK in Netscape 3.0x.  Trying it in Netscape 4.0x, except that I think kanga just went down, because I can't even access the server now.
0
bigelosCommented:
To the best of my knowledge, everyone who has access to http has access to ftp.  Don't link to the directory on the ftp server, link directly to the file on the ftp server.  Users won't even notice the difference when they click on the file, except that it will come across as ftp Vs. http.
0
capttomAuthor Commented:
How do I link that? I tried ftp://ftp.dragondata.com/~storm/files/filename and got file or dir not found
0
bigelosCommented:
First, you need to have an FTP server.  Then, you would use a simple
<A HREF="ftp://ftp.sodre.net/pub/eggdrop/scripts1.3/facelift3_0_tcl.gz">facelift3_0_tcl.gz</a>

So, you need to find out what your ftp server name is, and where to put publicly accessible files.
0
capttomAuthor Commented:
Here's a new wrinkle: If I change the file name from whatever_tar.gz to whatever.tar.gz it will download it but changes the name to whatever.tar.tar
The file downloads uncorrupted this way
0
bigelosCommented:
Sounds like there is an incompatibility issue somewhere between your server, gzip, and Netscape 4.04.  If you want, I can open this question back up for discussion by everyone.
0
capttomAuthor Commented:
Maybe we should do that since I'm no closer to fixing it :( Is there any way to move it to the Browser area?
0
bigelosCommented:
I'll post the question there.
0
bigelosCommented:
Question is posted in Browsers area
0
It's more than this solution.Get answers and train to solve all your tech problems - anytime, anywhere.Try it for free Edge Out The Competitionfor your dream job with proven skills and certifications.Get started today Stand Outas the employee with proven skills.Start learning today for free Move Your Career Forwardwith certification training in the latest technologies.Start your trial today
Web Development

From novice to tech pro — start learning today.