'Determines whether the file is in html format
>>> from galaxy.datatypes.sniff import get_test_fname
>>> fname = get_test_fname( \'complete.bed\' )
>>> Html().sniff( fname )
False
>>> fname = get_test_fname( \'file.html\' )
>>> Html().sniff( fname )
True'

def sniff(self, filename):

    headers = iter_headers(filename, None)
    try:
        for (i, hdr) in enumerate(headers):
            if (hdr and (hdr[0].lower().find('<html>') >= 0)):
                return True
        return False
    except:
        return True
