[ODBC-59] Tar disto downloads are corrupt Created: 2016-10-09 Updated: 2016-10-14 Resolved: 2016-10-14 |
|
| Status: | Closed |
| Project: | MariaDB Connector/ODBC |
| Component/s: | None |
| Affects Version/s: | 2.0.12 |
| Fix Version/s: | 2.0.12 |
| Type: | Bug | Priority: | Major |
| Reporter: | Howard Johnson | Assignee: | Daniel Bartholomew |
| Resolution: | Fixed | Votes: | 0 |
| Labels: | None | ||
| Environment: |
Debian 8.6 Jessie Stable |
||
| Description |
|
On your web page: https://mariadb.com/my_portal/download/connector-odbc/2.0 When I download the tar.gz files and try to open them I get an error message suggesting that the downloads are corrupt. I can gunzip them, but not tar x them. For example, tar -tf "mariadb-connector-odbc-2.0.12-ga-linux-x86_64.tar.gz" Gives these three lines of error: tar: This does not look like a tar archive Contrast this with the downloads for your JDBC: tar -tf "mariadb-java-client-1.5.3.tar.gz" which works fine. Thanks for your work on this! |
| Comments |
| Comment by Daniel Bartholomew [ 2016-10-10 ] |
|
I've checked all the files both directly on the server and after downloading them via the web portal from the server to my workstation, and they all seem to check out. The "tar -tf ..." command also works as is should on all of them. Can you verify that the file you downloaded matches the md5sum, sha1sum, and/or gpg signature we have listed? You can see the sums and signatures by clicking on the Thanks. |
| Comment by Howard Johnson [ 2016-10-10 ] |
|
Hi Daniel, So I tried to download the file with wget, and what I got works with tar -tf. Then I tried to download with Chrome instead of Firefox, and that also works. So it's only Firefox that does not work. A web search turned up this conversation about the same problem: Now if I gunzip the firefox downloaded foo.tar.gz file, it gives me a foo.tar file, and if I then rename this from foo.tar to foo.tar.gz, now tar -tf works! So the file is somehow getting zipped twice. So next I decided to investigate the http headers your server is sending. Here they are for the working and non-working downloads: Connection: keep-alive Connection: keep-alive "Content-Encoding: gzip" says the file transmitted over the Internet will get zipped, and the browser should unzip it when it receives it. So I'm guessing then that the tar.gz source file on your end, is getting redundantly zipped by your web server, i.e. it's a tar.gz file in your server folder, and your servers is set to also zip the file, thus zipping it twice. Then Firefox takes a look at what it got, with the tar.gz extension, guesses wrong, and does not unzip it, assuming it is a server error to double zip it. Even though wget and Chrome do unzip this, I think it's nevertheless an error to be double zipping it on your server. For files that are already zipped the http server header should not be "Content-Encoding: gzip". What do you think? Does this make sense to you? In any event, Firefox is a common enough browser that it should work without fussing with it's internal settings. And I have not had this trouble downloading other tar.gz files from other sites. So I think a small change to your server will make this problem go away. For me, for now I have a workaround. Thanks for your help. – Howard |
| Comment by Lawrin Novitsky [ 2016-10-10 ] |
|
Could you please try to gunzip it first, and then try the same tar command? Worked for me and xf, too. I am not sure why that can happen. |
| Comment by Howard Johnson [ 2016-10-10 ] |
|
BTW, for completeness, my Firefix is: 45.4.0 Firefox-ESR (Extended support, meaning the version is more stable over time than with the normal Firefox). I the reasons I use Firefox and not chrome, because I have a dual boot system w/ Debian/Windows10, and 1) Firefox will use the same profile for both OS, and so when I switch from on OS to the other, my browser tabs are the same on both operating system, and 2) the version does not change as often, lessening the chance of messing up the profile that is shared by both systems. |
| Comment by Howard Johnson [ 2016-10-10 ] |
|
@Novitsky, Hi, I had already tried that, but after the gunzip, the tar x would fail. Please be sure to read my extended comments 2 back 20 minutes ago. Thanks! |
| Comment by Lawrin Novitsky [ 2016-10-10 ] |
|
sorry, sorry. I did not reload the page before commenting. and somehow I received mail notifications only now |
| Comment by Howard Johnson [ 2016-10-10 ] |
|
@Novitsky, Yes, if I first gunzip it, (and it renames it foo.tar) and then tar -tf foo.tar (unzip it again) it works. I didn't know I didn't need to rename it. Thanks for that tip. I just also submitted a bug report to Firefox. But make no mistake, both your server and Firefox have issues, just different ones. If the file had not been double zipped in the first place I don't think Firefox would have gotten it wrong. But given that Chrome and wget get it right even when double zipped, I suggested to Firefox to change their guess and not jump the the conclusion that they don't need to unzip it. Thanks again. |
| Comment by Daniel Bartholomew [ 2016-10-11 ] |
|
bryan or adam.donnison can you take a look at this? It seems Firefox is having trouble with how our webserver is serving gzipped files. |
| Comment by Adam Donnison (Inactive) [ 2016-10-12 ] |
|
dbart I've turned off the gzip compression at the web server level and tested on FF and it now appears to work OK. Seems there may be a bug in that module as it was not supposed to encode anything other than text, JSON or XML. |
| Comment by Adam Donnison (Inactive) [ 2016-10-12 ] |
|
Turns out it is in the method that the backend supplies files to the web server, they are being mis-typed and therefore the gzip handling assumes they require gzipping. As mentioned I've disabled gzip just on those files, and will work with bryan to put in a more permanent fix. |
| Comment by Adam Donnison (Inactive) [ 2016-10-13 ] |
|
This should now be resolved. bryan has modified the backend code, and the web server is now correctly identifying the file as already compressed and is no longer double-compressing. Tested in FF and Chrome. |
| Comment by Howard Johnson [ 2016-10-13 ] |
|
Great! Works here. Thanks. And interesting to hear what it turned out to be, and how it was fixed. |
| Comment by Daniel Bartholomew [ 2016-10-14 ] |
|
adam.donnison & bryan: Thank you for getting it fixed! |