diff options
Diffstat (limited to 'includes/fetcher/node_modules/axios/lib/helpers/normalizeHeaderName.js')
-rw-r--r-- | includes/fetcher/node_modules/axios/lib/helpers/normalizeHeaderName.js | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/includes/fetcher/node_modules/axios/lib/helpers/normalizeHeaderName.js b/includes/fetcher/node_modules/axios/lib/helpers/normalizeHeaderName.js new file mode 100644 index 0000000..738c9fe --- /dev/null +++ b/includes/fetcher/node_modules/axios/lib/helpers/normalizeHeaderName.js @@ -0,0 +1,12 @@ +'use strict'; + +var utils = require('../utils'); + +module.exports = function normalizeHeaderName(headers, normalizedName) { + utils.forEach(headers, function processHeader(value, name) { + if (name !== normalizedName && name.toUpperCase() === normalizedName.toUpperCase()) { + headers[normalizedName] = value; + delete headers[name]; + } + }); +}; |