{"action":"created","issue":{"url":"https://api.github.com/repos/samtools/htsjdk/issues/331","labels_url":"https://api.github.com/repos/samtools/htsjdk/issues/331/labels{/name}","comments_url":"https://api.github.com/repos/samtools/htsjdk/issues/331/comments","events_url":"https://api.github.com/repos/samtools/htsjdk/issues/331/events","html_url":"https://github.com/samtools/htsjdk/issues/331","id":108004650,"number":331,"title":"bug:  hasBlockCompressedExtension fails for URLs with parameters","user":{"login":"jrobinso","id":933148,"avatar_url":"https://avatars.githubusercontent.com/u/933148?v=3","gravatar_id":"","url":"https://api.github.com/users/jrobinso","html_url":"https://github.com/jrobinso","followers_url":"https://api.github.com/users/jrobinso/followers","following_url":"https://api.github.com/users/jrobinso/following{/other_user}","gists_url":"https://api.github.com/users/jrobinso/gists{/gist_id}","starred_url":"https://api.github.com/users/jrobinso/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/jrobinso/subscriptions","organizations_url":"https://api.github.com/users/jrobinso/orgs","repos_url":"https://api.github.com/users/jrobinso/repos","events_url":"https://api.github.com/users/jrobinso/events{/privacy}","received_events_url":"https://api.github.com/users/jrobinso/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":1,"created_at":"2015-09-23T20:57:13Z","updated_at":"2015-09-23T21:37:19Z","closed_at":null,"body":"The method \"AbstractFeatureReader.hasBlockCompressedExtension\" does not take into account url parameters and thus fails for resources such as the following because it doesn't end in \".gz\"\r\n\r\nhttps://www.googleapis.com/download/storage/v1/b/deflaux-public-test/o/NA12877.vcf.gz?generation=1440375388453000&alt=media"},"comment":{"url":"https://api.github.com/repos/samtools/htsjdk/issues/comments/142737472","html_url":"https://github.com/samtools/htsjdk/issues/331#issuecomment-142737472","issue_url":"https://api.github.com/repos/samtools/htsjdk/issues/331","id":142737472,"user":{"login":"jrobinso","id":933148,"avatar_url":"https://avatars.githubusercontent.com/u/933148?v=3","gravatar_id":"","url":"https://api.github.com/users/jrobinso","html_url":"https://github.com/jrobinso","followers_url":"https://api.github.com/users/jrobinso/followers","following_url":"https://api.github.com/users/jrobinso/following{/other_user}","gists_url":"https://api.github.com/users/jrobinso/gists{/gist_id}","starred_url":"https://api.github.com/users/jrobinso/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/jrobinso/subscriptions","organizations_url":"https://api.github.com/users/jrobinso/orgs","repos_url":"https://api.github.com/users/jrobinso/repos","events_url":"https://api.github.com/users/jrobinso/events{/privacy}","received_events_url":"https://api.github.com/users/jrobinso/received_events","type":"User","site_admin":false},"created_at":"2015-09-23T21:37:19Z","updated_at":"2015-09-23T21:37:19Z","body":"The following version of the method fixes the problem\r\n\r\n    public static boolean hasBlockCompressedExtension(final String path) {\r\n\r\n        final String fileName = (path.startsWith(\"http://\") || path.startsWith(\"https://\")) ?\r\n                path.split(\"\\\\?\", 2)[0] :\r\n                path;\r\n\r\n        for (final String extension : BLOCK_COMPRESSED_EXTENSIONS) {\r\n            if (fileName.toLowerCase().endsWith(extension))\r\n                return true;\r\n        }\r\n        return false;\r\n    }\r\n"}}