https-agent: fix issue where creating connection modifies arguments
Previously, when passing options object to the agent.createConnection method, the same options object got modified within the method. Now, any modification will happen on only a copy of the object.
Fixes: https://github.com/nodejs/node/issues/31119
Checklist
-
make -j4 test
(UNIX), orvcbuild test
(Windows) passes -
tests and/or benchmarks are included -
documentation is changed or added -
commit message follows commit guidelines