nervgh/angular-file-upload — pull request #276 by yuriMalakhov (2014-10-19 23:03:39+00:00)
Title: Added hotfix to support compliance with new ~1.3.0 angular version.

In new 1.3.0 angular version defaultHttpResponseTransform function now needs second parameter "headers" to be passed in. Then it tries to get response's content type from it, in order to decide weather to parse response from json or not. Without passing this parameter we will get Uncaught TypeError: undefined is not a function. Therefore, we are to pass header getter function to fix it.
```javascript
transformResponse: [function defaultHttpResponseTransform(data, headers) {
if (isString(data)) {
// strip json vulnerability protection prefix
data = data.replace(PROTECTION_PREFIX, '');
var contentType = headers('Content-Type');
if ((contentType && contentType.indexOf(APPLICATION_JSON) === 0) ||
(JSON_START.test(data) && JSON_END.test(data))) {
data = fromJson(data);
}
}
return data;
}]
```javascript