angular/angular.js — pull request #10359 by pkozlowski-opensource (2014-12-07 18:50:11+00:00)
Title: refactor($http): avoid re-creating execHeaders function

The execHeaders function was being re-defined inside mergeHeaders
function. Additionally it was mutating its arguments thus making code
harder to read / reason about.

There are some other problems with this function (inconsistent treatment for null / undefined headers coming from an object value as compared to being result of a function execution) but let's tackle those one by one.