Solved

download glitches on .gz files

Posted on 1998-01-29
21
331 Views
Last Modified: 2013-12-25
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.
0
Comment
Question by:capttom
  • 13
  • 8
21 Comments
 
LVL 3

Expert Comment

by:bigelos
ID: 1856785
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
 
LVL 3

Expert Comment

by:bigelos
ID: 1856786
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
 

Author Comment

by:capttom
ID: 1856787
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
 
LVL 3

Expert Comment

by:bigelos
ID: 1856788
What browser are you using?
0
 
LVL 3

Expert Comment

by:bigelos
ID: 1856789
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
 

Author Comment

by:capttom
ID: 1856790
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
 
LVL 3

Accepted Solution

by:
bigelos earned 100 total points
ID: 1856791
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
 

Author Comment

by:capttom
ID: 1856792
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
 
LVL 3

Expert Comment

by:bigelos
ID: 1856793
Just checked with Internet Explorer 3.x and the file looked fine as well.
0
 

Author Comment

by:capttom
ID: 1856794
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
How your wiki can always stay up-to-date

Quip doubles as a “living” wiki and a project management tool that evolves with your organization. As you finish projects in Quip, the work remains, easily accessible to all team members, new and old.
- Increase transparency
- Onboard new hires faster
- Access from mobile/offline

 
LVL 3

Expert Comment

by:bigelos
ID: 1856795
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
 

Author Comment

by:capttom
ID: 1856796
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
 
LVL 3

Expert Comment

by:bigelos
ID: 1856797
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
 
LVL 3

Expert Comment

by:bigelos
ID: 1856798
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
 

Author Comment

by:capttom
ID: 1856799
How do I link that? I tried ftp://ftp.dragondata.com/~storm/files/filename and got file or dir not found
0
 
LVL 3

Expert Comment

by:bigelos
ID: 1856800
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
 

Author Comment

by:capttom
ID: 1856801
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
 
LVL 3

Expert Comment

by:bigelos
ID: 1856802
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
 

Author Comment

by:capttom
ID: 1856803
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
 
LVL 3

Expert Comment

by:bigelos
ID: 1856804
I'll post the question there.
0
 
LVL 3

Expert Comment

by:bigelos
ID: 1856805
Question is posted in Browsers area
0

Featured Post

How your wiki can always stay up-to-date

Quip doubles as a “living” wiki and a project management tool that evolves with your organization. As you finish projects in Quip, the work remains, easily accessible to all team members, new and old.
- Increase transparency
- Onboard new hires faster
- Access from mobile/offline

Join & Write a Comment

Why do we like using grid based layouts in website design? Let's look at the live examples of websites and compare them to grid based WordPress themes.
Envision that you are chipping away at another e-business site with a team of pundit developers and designers. Everything seems, by all accounts, to be going easily.
Viewers will get an overview of the benefits and risks of using Bitcoin to accept payments. What Bitcoin is: Legality: Risks: Benefits: Which businesses are best suited?: Other things you should know: How to get started:
Explain concepts important to validation of email addresses with regular expressions. Applies to most languages/tools that uses regular expressions. Consider email address RFCs: Look at HTML5 form input element (with type=email) regex pattern: T…

707 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

17 Experts available now in Live!

Get 1:1 Help Now