rejetto forum

Software => HFS ~ HTTP File Server => Topic started by: bitingsock on April 16, 2016, 05:52:03 AM

Title: tar headers corrupt
Post by: bitingsock on April 16, 2016, 05:52:03 AM
When using the archive feature, the resulting tarballs have incorrect headers; the length metadata is bad (I think) making unpackers think that there is data erroneously packed at the end of the archive. 7zip particularly has problems as it will not ignore header errors when extracting unlike other programs that do ignore them. 7zip will unpack the length specified in the header and will leave off the rest  (I think). From my tests it seems to have something to do with folder recursion but I could not say for certain. I can PM a link to an example problem ( i don't really want to put my dyndns out there)
Title: Re: tar headers corrupt
Post by: bmartino1 on April 16, 2016, 07:23:02 AM
is this a fresh download of HFS? are there any template changes.
*ther have been other reports on the forum in which a fix was a fresh download...

There have been issues before with "tar" archiving on certain files...
*what files are you zipping? doc / docx / excel... etc....

are any files "0" bytes in size? are they actual files or are they symlink/shortcuts....
*there is a know problem trying to archive a file with nothing in it....
--------------------------------------
i'm surprised that 7zip isn't working to exact, even in a croupted forum (print screen of the error form 7zip would be helpful..., i have personally found 7zip better than any other zip tool to get the files....


Explain please, why you think its the headed of the tar archive?...
why do you suspect that?
 
Title: Re: tar headers corrupt
Post by: rejetto on April 16, 2016, 10:12:47 AM
welcome! and thanks for the report.
i'm a 7zip user myself and i never faced such  error,
so i expect there are specific conditions to make it happen.
Can you instruct me in reproducing the problem?
Please try to keep the example at its minimum, remove anything that it's not affecting the problem.
Title: Re: tar headers corrupt
Post by: bitingsock on April 16, 2016, 05:35:04 PM
Attached is 7zip giving the error. This is an attempt after removing an edited template. The difference between the size reported by 7zip and the actual size of the tarball is why I think the header is bad. There are actually 5 folders in the tarball but 7zip only extracts 3 of them; I assume this is where the header says the end of the archive is. I'll PM you both with a link to this example.
Title: Re: tar headers corrupt
Post by: bmartino1 on April 17, 2016, 04:13:07 AM
thx for the PM, i'm tryign to see where it fails.

here is some other forum info on the topic: http://www.rejetto.com/forum/bug-reports/no-archive-since-2-3f/

also doent help to look at 7zip forumL

https://sourceforge.net/p/sevenzip/bugs/1455/
https://sourceforge.net/p/sevenzip/bugs/1603/
Title: Re: tar headers corrupt
Post by: bitingsock on April 17, 2016, 05:08:11 AM
I came across this thread
https://sourceforge.net/p/sevenzip/discussion/45797/thread/4286f2d1/
I thought I should ask if hfs uses the project in question here.
Title: Re: tar headers corrupt
Post by: rejetto on April 17, 2016, 08:36:29 AM
I thought I should ask if hfs uses the project in question here.

HFS is not using any library for TARs, it's my own implementation. I needed some features I couldn't find anywhere.

Anyway, I downloaded your link, verified and extracted with 7zip version 9, no errors.
Did the same with version 15.14 (64bit): again, no errors.
At this point i wonder if we got the same archive, so this is my md5 if you want to check: 5f754f85f882da607a20ba16b445eb46 .
Ensure you download exactly the link you gave me, and let's hope nothing changed in the folder otherwise you will surely get a different fingerprint.

Since you like metal, be sure to check my band :D http://mistymorning.bandcamp.com/
Title: Re: tar headers corrupt
Post by: bitingsock on April 17, 2016, 05:52:13 PM
My MD5 is identical. Can you confirm that you get all 5 albums extracted and not just 3. In the 7zip manager gui if you click the info button it says header errors for me, with a "tail size" of 250MB which is certainly the 2 albums not being accounted for.

I'll certainly check you guys out, I like a lot of different music!

edit: I wish I knew italian, gagarin sounds a little wierd compared to the italian version (I imagine). by the way, sweet mustache bro.
Title: Re: tar headers corrupt
Post by: LeoNeeson on April 18, 2016, 05:34:35 AM
If the MD5 is the same, then why don't you share your 7zip version (I mean, sharing all the files of the 7zip program, located in C:\Program Files\7-Zip), so Rejetto can try to reproduce your problem, using exactly the same 7zip version.
Title: Re: tar headers corrupt
Post by: bitingsock on April 18, 2016, 06:36:15 AM
Would that be usefull? I'm using 15.14 64bit as well. worth a shot I guess,
https://anonfiles.com/file/c1bf374bf614b4a5eb9fc99d0f2f4deb
Title: Re: tar headers corrupt
Post by: bmartino1 on April 18, 2016, 02:42:26 PM
Would that be usefull? I'm using 15.14 64bit as well. worth a shot I guess,
https://anonfiles.com/file/c1bf374bf614b4a5eb9fc99d0f2f4deb

the aynomuos network. ("anonfiles.com" is a prety bad hack temp site, 50  tryied to get in on the router.... guess that one geting add to the black list!) ..

THis stems down from havin a beta/bad version of 7zip...
although i have an offical build off of 7zip site, and was unable to get past 3 of the 5 folder from the tar archive, with 7zip giving issues about the header.

if 7zip version 9 works, i recommended to use that one....
beta version 9 : http://filehippo.com/download_7-zip_64/59707/
last stable version 9: http://filehippo.com/download_7-zip_64/8755/
Title: Re: tar headers corrupt
Post by: bitingsock on April 18, 2016, 05:04:46 PM
Oh, sorry about that, I've used them frequently without problems.
Anyway, version 9 does work because I think the error checking was not implemented back in that branch; but I'd rather not have to tell everyone I share files with that they need some other version besides the most popular one :(
Title: Re: tar headers corrupt
Post by: bmartino1 on April 18, 2016, 05:19:36 PM
Oh, sorry about that, I've used them frequently without problems.
Anyway, version 9 does work because I think the error checking was not implemented back in that branch; but I'd rather not have to tell everyone I share files with that they need some other version besides the most popular one :(

whichi s also why i link this site:

http://www.rejetto.com/forum/bug-reports/no-archive-since-2-3f/

they might have some code or other to help fix this issue, i can confirm that its not working, this is a template isue in how HFS is "archiving"

i also belicve there was tlak of chaing the info to excute a 7zip....
been a long while, had soemthign programed like that to "tar archive, i know it possible...
Title: Re: tar headers corrupt
Post by: LeoNeeson on April 19, 2016, 07:07:26 AM
...but I'd rather not have to tell everyone I share files with that they need some other version besides the most popular one :(
I totally agree with you.
The last 7-Zip version is 15.14 (2015-12-31)
The official 7-Zip website is http://www.7-zip.org/ (http://www.7-zip.org/)

Would that be usefull? I'm using 15.14 64bit as well. worth a shot I guess,
https://anonfiles.com/file/c1bf374bf614b4a5eb9fc99d0f2f4deb
Your files are OK, you are using the last official release version. In case someone has trouble downloading your file from anonfiles.com, I've made a MD5 of your uploaded file (file attached). The only different file from the official distribution, is the file "7za.exe" (may be you've copied from an older version). That file is attached here too. Anyway, all the important thing here, is you are using the last version.

Maybe this error is related to Windows 10? Maybe Rejetto has only tested on XP? I don't have Windows 10 to test this. Well, if he can't reproduce your error, I don't know what else to suggest, sorry...
Title: Re: tar headers corrupt
Post by: bitingsock on April 19, 2016, 08:41:12 AM
Indeed, the 7za.exe is from a previous install. I use it for a dependency somewhere but I should remove it.
Title: Re: tar headers corrupt
Post by: bmartino1 on April 19, 2016, 01:34:53 PM
at this point, i would recommend having a zip backup (sure it takes up space, but you can guarantee a  1 time download and a better ziped file.....

i have done test on win 7 / win 10, and can cornfirm this error on his site, i will try my own pc to double check....

if i were on linux, i would attempt to repair the tar: (but if you plan to go public, then this option wouldn't be fesiable.....
http://riaschissl.bestsolution.at/2015/03/repair-corrupt-tar-archives-the-better-way/

other wise, we may need to update or fix the archive code in the HFS template for your situation:
this is the default template code from 2.3 f....

Code: [Select]
{.if|{.get|can archive.}|
<button id='archiveBtn' onclick='if (confirm("{.!confirm.}")) submit({}, "{.get|url|mode=archive|recursive.}")'>{.!Archive.}</button>
.}
<a href="{.get|url|tpl=list|sort=|{.if not|{.length|{.?search.}.}|{:folders-filter=\|recursive:}.}.}">{.!Get list.}</a>
</center>


and when i have free time, i will look nto scriptiong 7zip into it...
http://www.rejetto.com/forum/bug-reports/no-archive-since-2-3f/msg1060967/#msg1060967
Title: Re: tar headers corrupt
Post by: bmartino1 on April 22, 2016, 08:23:27 PM
looking further into it, 7zip can be used to take in a http url and be done via comand line, building it into an archive button of a folder is a bit tricky-er and a bit complex for my time....


7zip cmd:
http://www.dotnetperls.com/7-zip-examples

cmd> 7z.exe (archive type switch) http:/path to folder/file archive.filetype

BUT, i did find this nifity javascript code that could ealiy be implement into HFS for zip support:
https://stuk.github.io/jszip/

https://stuk.github.io/jszip/documentation/examples.html

but that is rejeto department....

it also looks like - getting back on topic to his issue and post that a fesh download and archive of a tar is working...
Title: Re: tar headers corrupt
Post by: rejetto on April 24, 2016, 10:34:07 PM
i'm sorry, i confirm 7zip only extracts 3 folders instead of 5. I just didn't pay enough attention, and verification of latest version reports an error.

Total Commander instead has no problem in handling it.
I've found that it happens with file paths longer than 100.

It took me hours, but now it should be able to produce TAR files that are good for 7zip as well.
You will get it in the next version, 2.3h, soon to be released
Title: Re: tar headers corrupt
Post by: rejetto on April 25, 2016, 02:56:18 PM
http://www.rejetto.com/forum/hfs-~-http-file-server/2-3h-preview/
Title: Re: tar headers corrupt
Post by: bitingsock on April 30, 2016, 05:43:40 PM
Sorry about no response for a while.
2.3h fixes the problem. Thanks for all the work guys!