angular/angular.js — pull request #6534 by mfield (2014-03-04 05:03:42+00:00)
Title: fix($http): resolve cached requests with the proper config when hitting a cached promise

If an $http request is cached but not yet resolved, and a second request is made to the same
URL; be sure to resolve the second request's promise with the second request's config object.

The way I read the current docs on $http, the original behavior is not described, so
this does not introduce any backwards compatibility concerns.

My use case is to communicate between interceptors on either side of the same request using data stashed in the config object. Since the interceptors are initialized once by the injector I don't see a good way to store the data in a closure instead. This behavior seems more consistent anyway, since the non-cached and cached-and-resolved cases both work as expected.