{"action":"closed","issue":{"url":"https://api.github.com/repos/sinonjs/sinon/issues/1105","repository_url":"https://api.github.com/repos/sinonjs/sinon","labels_url":"https://api.github.com/repos/sinonjs/sinon/issues/1105/labels{/name}","comments_url":"https://api.github.com/repos/sinonjs/sinon/issues/1105/comments","events_url":"https://api.github.com/repos/sinonjs/sinon/issues/1105/events","html_url":"https://github.com/sinonjs/sinon/issues/1105","id":166213132,"number":1105,"title":"Progress events from non-200 responses should have `e.loaded = 0`","user":{"login":"fearphage","id":23887,"avatar_url":"https://avatars.githubusercontent.com/u/23887?v=3","gravatar_id":"","url":"https://api.github.com/users/fearphage","html_url":"https://github.com/fearphage","followers_url":"https://api.github.com/users/fearphage/followers","following_url":"https://api.github.com/users/fearphage/following{/other_user}","gists_url":"https://api.github.com/users/fearphage/gists{/gist_id}","starred_url":"https://api.github.com/users/fearphage/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/fearphage/subscriptions","organizations_url":"https://api.github.com/users/fearphage/orgs","repos_url":"https://api.github.com/users/fearphage/repos","events_url":"https://api.github.com/users/fearphage/events{/privacy}","received_events_url":"https://api.github.com/users/fearphage/received_events","type":"User","site_admin":false},"labels":[],"state":"closed","locked":false,"assignee":{"login":"fearphage","id":23887,"avatar_url":"https://avatars.githubusercontent.com/u/23887?v=3","gravatar_id":"","url":"https://api.github.com/users/fearphage","html_url":"https://github.com/fearphage","followers_url":"https://api.github.com/users/fearphage/followers","following_url":"https://api.github.com/users/fearphage/following{/other_user}","gists_url":"https://api.github.com/users/fearphage/gists{/gist_id}","starred_url":"https://api.github.com/users/fearphage/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/fearphage/subscriptions","organizations_url":"https://api.github.com/users/fearphage/orgs","repos_url":"https://api.github.com/users/fearphage/repos","events_url":"https://api.github.com/users/fearphage/events{/privacy}","received_events_url":"https://api.github.com/users/fearphage/received_events","type":"User","site_admin":false},"assignees":[{"login":"fearphage","id":23887,"avatar_url":"https://avatars.githubusercontent.com/u/23887?v=3","gravatar_id":"","url":"https://api.github.com/users/fearphage","html_url":"https://github.com/fearphage","followers_url":"https://api.github.com/users/fearphage/followers","following_url":"https://api.github.com/users/fearphage/following{/other_user}","gists_url":"https://api.github.com/users/fearphage/gists{/gist_id}","starred_url":"https://api.github.com/users/fearphage/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/fearphage/subscriptions","organizations_url":"https://api.github.com/users/fearphage/orgs","repos_url":"https://api.github.com/users/fearphage/repos","events_url":"https://api.github.com/users/fearphage/events{/privacy}","received_events_url":"https://api.github.com/users/fearphage/received_events","type":"User","site_admin":false}],"milestone":null,"comments":2,"created_at":"2016-07-18T23:01:57Z","updated_at":"2016-07-24T23:39:13Z","closed_at":"2016-07-24T23:39:13Z","body":"Non-200 requests now trigger the `load` event now (in `master` and maybe soon in `v1.17.*` - #1102). However the progress events triggered have several incorrect properties -- `loaded`, `total`, and `lengthComputable`. Here is an explanation in code:\r\n\r\n## Expected progress event from non-200 response\r\n\r\n```js\r\nvar progressEvent = {\r\n  loaded: 0,\r\n  total: 0,\r\n  lengthComputable: false\r\n};\r\n```\r\n\r\n## Actual progress event from non-200 response\r\n\r\n```js\r\nvar progressEvent = {\r\n  loaded: 100,\r\n  total: 100,\r\n  lengthComputable: true\r\n};\r\n```  \r\n\r\nI spotted the bug here:\r\n\r\nhttps://dl.dropboxusercontent.com/u/2400/tc/sinon/xhr-browser-test.htm\r\n\r\nWe've got the events correct now but not the properties of the triggered event.\r\n\r\nRelated: #1040"}}
{"actor":{"display_login":"fearphage"}}