Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

GET request is sending Content-Length header #29

Open
7macaw opened this issue May 13, 2017 · 0 comments
Open

GET request is sending Content-Length header #29

7macaw opened this issue May 13, 2017 · 0 comments

Comments

@7macaw
Copy link

7macaw commented May 13, 2017

here:

var body = options.body ? options.body : new Buffer(0);
if (typeof body === 'string') body = new Buffer(body);
assert(Buffer.isBuffer(body), 'body should be a Buffer or a String');
if (!headers.has('Content-Length')) {
headers.set('Content-Length', body.length);
}

Setting body to an empty dictionary so that body.length would be undefined doesn't help either because it checks what kind of a thing the body is.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant