Skip to content

GET request is sending Content-Length header #29

@7macaw

Description

@7macaw

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.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions