New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

doesn't sense all tarfiles? #1

Open
bronson opened this Issue Aug 27, 2010 · 1 comment

Comments

Projects
None yet
1 participant
@bronson
Contributor

bronson commented Aug 27, 2010

MimeMagic.by_magic isn't able to sense either file on this page as a tarfile: http://www.vim.org/scripts/script.php?script_id=1729

However, both tar and the Unix file utility like them.

$ wget http://www.vim.org/scripts/download_script.php?src_id=6516 -O tt.tar
$ file tt.tar      => tt.tar: tar archive

in irb:

require 'open-uri'
require 'mimemagic'
x = open('http://www.vim.org/scripts/download_script.php?src_id=6516')
MimeMagic.by_magic(x)    => nil
x = open('http://www.vim.org/scripts/download_script.php?src_id=2877')
MimeMagic.by_magic(x)    => application/x-tar 

(the last 2 are just to prove that mimemagic does sense other tarfiles)

Just fyi, mimemagic is serving me great.

@bronson

This comment has been minimized.

Show comment
Hide comment
@bronson

bronson Aug 27, 2010

Contributor

The version 1.0 tarfile on this page doesn't get sensed either: http://www.vim.org/scripts/script.php?script_id=2429

The rest are fine.

Contributor

bronson commented Aug 27, 2010

The version 1.0 tarfile on this page doesn't get sensed either: http://www.vim.org/scripts/script.php?script_id=2429

The rest are fine.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment