Should send opts and not opts.headers in getHeaderName

This commit is contained in:
Joxit 2018-07-12 10:17:59 +02:00
parent 137da9b903
commit b3f4042adb
1 changed files with 2 additions and 2 deletions

View File

@ -102,8 +102,8 @@ function setDefaults(defs) {
if (!opts.followOriginalHttpMethod) {
opts.method = 'GET';
opts.body = null;
delete opts.headers[getHeaderName(opts.headers, 'Content-Length')];
delete opts.headers[getHeaderName(opts.headers, 'Transfer-Encoding')];
delete opts.headers[getHeaderName(opts, 'Content-Length')];
delete opts.headers[getHeaderName(opts, 'Transfer-Encoding')];
}
if (opts.removeRefererHeader && opts.headers) {
delete opts.headers.referer;