Skip to content

https: Agent.createConnection mutates options object #31119

@ronag

Description

@ronag

createConnection should create a copy instead of mutating the passed options object.

const options = { port: 3000 };
htptpAgent.createConnection('localhost', 2000, options);
assert(options.port, 3000); // fails
assert(options.host, undefined); // fails

Metadata

Metadata

Assignees

No one assigned

    Labels

    good first issueIssues that are suitable for first-time contributors.httpsIssues or PRs related to the https subsystem.

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions