{"action":"opened","issue":{"url":"https://api.github.com/repos/toastedlime/wp-attachment-importer/issues/16","labels_url":"https://api.github.com/repos/toastedlime/wp-attachment-importer/issues/16/labels{/name}","comments_url":"https://api.github.com/repos/toastedlime/wp-attachment-importer/issues/16/comments","events_url":"https://api.github.com/repos/toastedlime/wp-attachment-importer/issues/16/events","html_url":"https://github.com/toastedlime/wp-attachment-importer/issues/16","id":53482313,"number":16,"title":"Fails when a remote server uses g-zip encoding","user":{"login":"deweydb","id":885167,"avatar_url":"https://avatars.githubusercontent.com/u/885167?v=3","gravatar_id":"","url":"https://api.github.com/users/deweydb","html_url":"https://github.com/deweydb","followers_url":"https://api.github.com/users/deweydb/followers","following_url":"https://api.github.com/users/deweydb/following{/other_user}","gists_url":"https://api.github.com/users/deweydb/gists{/gist_id}","starred_url":"https://api.github.com/users/deweydb/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/deweydb/subscriptions","organizations_url":"https://api.github.com/users/deweydb/orgs","repos_url":"https://api.github.com/users/deweydb/repos","events_url":"https://api.github.com/users/deweydb/events{/privacy}","received_events_url":"https://api.github.com/users/deweydb/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":0,"created_at":"2015-01-06T05:22:47Z","updated_at":"2015-01-06T05:22:47Z","closed_at":null,"body":"First of all. \r\nTHANK YOU SO FUCKING MUCH!\r\n\r\nthis plugin finally helped me realize why my wordpress imports were failing to import attachment images.\r\n\r\nHonestly i think the fault is in wp_get_http, but when you get a remote image file that is compressed, it fails here:\r\n\r\nif ( isset( $headers['content-length'] ) && $filesize != $headers['content-length'] ) {\r\n\r\nWhich it should.  But maybe there is a way we could detect that it is gzipped and try to decompress, before just failing?"}}