angular/angular.js — pull request #9907 by gampleman (2014-11-04 19:25:02+00:00)
Title: fix($http): won't parse single space response

According to [this question](http://stackoverflow.com/questions/3351247/how-to-return-truly-empty-body-in-rails-i-e-content-length-0), Rails in order to patch a bug in Safari, returns a single space when calling `head :ok`, which is the standard for POST requests.

Angular since [9ba24c54d](https://github.com/angular/angular.js/commit/9ba24c54d60e643b1450cc5cfa8f990bd524c130) checks if the body is empty before calling JSON parse, but this still breaks in this case, since the body isn't empty, but contains a single space.

We are hitting this issue when trying to upgrade from Angular 1.2.10. This PR should help in that case.