{"action":"closed","issue":{"url":"https://api.github.com/repos/rs/SDWebImage/issues/547","repository_url":"https://api.github.com/repos/rs/SDWebImage","labels_url":"https://api.github.com/repos/rs/SDWebImage/issues/547/labels{/name}","comments_url":"https://api.github.com/repos/rs/SDWebImage/issues/547/comments","events_url":"https://api.github.com/repos/rs/SDWebImage/issues/547/events","html_url":"https://github.com/rs/SDWebImage/issues/547","id":22253494,"number":547,"title":"ios7 - connectionDidFinishLoading not called but didFailWithError whilst all data was sent","user":{"login":"wvdhaute","id":765069,"avatar_url":"https://avatars.githubusercontent.com/u/765069?v=3","gravatar_id":"","url":"https://api.github.com/users/wvdhaute","html_url":"https://github.com/wvdhaute","followers_url":"https://api.github.com/users/wvdhaute/followers","following_url":"https://api.github.com/users/wvdhaute/following{/other_user}","gists_url":"https://api.github.com/users/wvdhaute/gists{/gist_id}","starred_url":"https://api.github.com/users/wvdhaute/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/wvdhaute/subscriptions","organizations_url":"https://api.github.com/users/wvdhaute/orgs","repos_url":"https://api.github.com/users/wvdhaute/repos","events_url":"https://api.github.com/users/wvdhaute/events{/privacy}","received_events_url":"https://api.github.com/users/wvdhaute/received_events","type":"User","site_admin":false},"labels":[{"url":"https://api.github.com/repos/rs/SDWebImage/labels/bug","name":"bug","color":"f70000"}],"state":"closed","locked":false,"assignee":null,"milestone":{"url":"https://api.github.com/repos/rs/SDWebImage/milestones/3","html_url":"https://github.com/rs/SDWebImage/milestones/4.0.0","labels_url":"https://api.github.com/repos/rs/SDWebImage/milestones/3/labels","id":696126,"number":3,"title":"4.0.0","description":"","creator":{"login":"bpoplauschi","id":154913,"avatar_url":"https://avatars.githubusercontent.com/u/154913?v=3","gravatar_id":"","url":"https://api.github.com/users/bpoplauschi","html_url":"https://github.com/bpoplauschi","followers_url":"https://api.github.com/users/bpoplauschi/followers","following_url":"https://api.github.com/users/bpoplauschi/following{/other_user}","gists_url":"https://api.github.com/users/bpoplauschi/gists{/gist_id}","starred_url":"https://api.github.com/users/bpoplauschi/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/bpoplauschi/subscriptions","organizations_url":"https://api.github.com/users/bpoplauschi/orgs","repos_url":"https://api.github.com/users/bpoplauschi/repos","events_url":"https://api.github.com/users/bpoplauschi/events{/privacy}","received_events_url":"https://api.github.com/users/bpoplauschi/received_events","type":"User","site_admin":false},"open_issues":109,"closed_issues":27,"state":"open","created_at":"2014-06-19T19:21:07Z","updated_at":"2016-05-30T03:38:53Z","due_on":null,"closed_at":null},"comments":3,"created_at":"2013-11-07T09:39:50Z","updated_at":"2016-05-30T03:38:53Z","closed_at":"2016-05-30T03:38:53Z","body":"I am seeing this issue only on ios7 for my app.\r\n\r\nFor some images I am seeing in that all data of the request is being processed successfilly yet I am getting a -1005,The network connection was lost error going to didFailWithError for some reason.\r\nI checked the size of the data for the failing images and all is there.\r\n\r\nIf I just call connectionDidFinishLoading:connection from didFailWithError I can see the image was downloaded ok\r\n\r\n- (void)connection:(NSURLConnection *)connection didFailWithError:(NSError *)error\r\n{\r\n    [self connectionDidFinishLoading:connection];\r\n}\r\n\r\nLooking at the response headers I do not see any difference. In both cases the content-length does not seem to get processed ok in didReceiveResponse yet all goes ok in the latter case. ((NSHTTPURLResponse *)response).expectedContentLength\r\n\r\nAn example of an image that triggers this consistently is:\r\nhttp://db.meta4books.be/mediafile/4fc7a35db911d5.24204692.jpg\r\n\r\n======== logging ========\r\n2013-11-07 10:31:55.186 iWish[6623:330b] didReceiveResponse http://db.meta4books.be/mediafile/4fc7a35db911d5.24204692.jpg\r\n2013-11-07 10:31:55.187 iWish[6623:330b] Status code: 200 - length: -1\r\n2013-11-07 10:31:55.187 iWish[6623:330b] didReceiveData http://db.meta4books.be/mediafile/4fc7a35db911d5.24204692.jpg\r\n2013-11-07 10:31:55.187 iWish[6623:330b] Data: 2508\r\n2013-11-07 10:31:55.187 iWish[6623:330b] didReceiveData http://db.meta4books.be/mediafile/4fc7a35db911d5.24204692.jpg\r\n2013-11-07 10:31:55.188 iWish[6623:330b] Data: 6800\r\n2013-11-07 10:31:55.188 iWish[6623:330b] didReceiveData http://db.meta4books.be/mediafile/4fc7a35db911d5.24204692.jpg\r\n2013-11-07 10:31:55.189 iWish[6623:330b] Data: 8228\r\n2013-11-07 10:31:55.189 iWish[6623:330b] didReceiveData http://db.meta4books.be/mediafile/4fc7a35db911d5.24204692.jpg\r\n2013-11-07 10:31:55.189 iWish[6623:330b] Data: 10722\r\n2013-11-07 10:31:55.190 iWish[6623:330b] didFailWithError Error Domain=NSURLErrorDomain Code=-1005 \"The network connection was lost.\" UserInfo=0xbeb9110 {NSErrorFailingURLStringKey=http://db.meta4books.be/mediafile/4fc7a35db911d5.24204692.jpg, NSErrorFailingURLKey=http://db.meta4books.be/mediafile/4fc7a35db911d5.24204692.jpg, NSLocalizedDescription=The network connection was lost., NSUnderlyingError=0x134a8980 \"The network connection was lost.\"}\r\n=========== end logging ============\r\n\r\nAn example of an image that is processed successfully consistently is:\r\nhttp://db.meta4books.be/mediafile/4fc7a433ec9959.26589002.jpg\r\n=========== logging ============\r\n311-10:34:44 IWSearchTableViewController.m:235 | DEBUG   : load image http://db.meta4books.be/mediafile/4fc7a433ec9959.26589002.jpg\r\n2013-11-07 10:34:44.736 iWish[6704:1203] didReceiveResponse http://db.meta4books.be/mediafile/4fc7a433ec9959.26589002.jpg\r\n2013-11-07 10:34:44.736 iWish[6704:1203] Status code: 200 - length: -1\r\n2013-11-07 10:34:44.736 iWish[6704:1203] didReceiveData http://db.meta4books.be/mediafile/4fc7a433ec9959.26589002.jpg\r\n2013-11-07 10:34:44.737 iWish[6704:1203] Data: 2513\r\n2013-11-07 10:34:44.737 iWish[6704:1203] didReceiveData http://db.meta4books.be/mediafile/4fc7a433ec9959.26589002.jpg\r\n2013-11-07 10:34:44.737 iWish[6704:1203] Data: 5931\r\n2013-11-07 10:34:44.739 iWish[6704:1203] didReceiveData http://db.meta4books.be/mediafile/4fc7a433ec9959.26589002.jpg\r\n2013-11-07 10:34:44.739 iWish[6704:1203] Data: 7233\r\n2013-11-07 10:34:44.739 iWish[6704:1203] willCacheResponse <NSCachedURLResponse: 0x16351370>\r\n2013-11-07 10:34:44.740 iWish[6704:1203] connectionDidFinishLoading http://db.meta4books.be/mediafile/4fc7a433ec9959.26589002.jpg\r\n\r\n=========== end logging ============\r\n\r\nAnyone else noticing this on ios7?\r\n\r\nregards,\r\nW."}}
{"actor":{"display_login":"bpoplauschi"}}