Should send opts and not opts.headers in getHeaderName
This commit is contained in:
parent
137da9b903
commit
b3f4042adb
4
index.js
4
index.js
|
@ -102,8 +102,8 @@ function setDefaults(defs) {
|
||||||
if (!opts.followOriginalHttpMethod) {
|
if (!opts.followOriginalHttpMethod) {
|
||||||
opts.method = 'GET';
|
opts.method = 'GET';
|
||||||
opts.body = null;
|
opts.body = null;
|
||||||
delete opts.headers[getHeaderName(opts.headers, 'Content-Length')];
|
delete opts.headers[getHeaderName(opts, 'Content-Length')];
|
||||||
delete opts.headers[getHeaderName(opts.headers, 'Transfer-Encoding')];
|
delete opts.headers[getHeaderName(opts, 'Transfer-Encoding')];
|
||||||
}
|
}
|
||||||
if (opts.removeRefererHeader && opts.headers) {
|
if (opts.removeRefererHeader && opts.headers) {
|
||||||
delete opts.headers.referer;
|
delete opts.headers.referer;
|
||||||
|
|
Loading…
Reference in New Issue