http: don't pass the request options to Agent
authorNathan Rajlich <nathan@tootallnate.net>
Fri, 13 Sep 2013 23:54:05 +0000 (16:54 -0700)
committerNathan Rajlich <nathan@tootallnate.net>
Sat, 14 Sep 2013 19:29:48 +0000 (12:29 -0700)
commitf31037ddfefdc8fab94980cd16a525827ba19abf
treeaf5ec68178ddf09ea29c0179de82874455a82de8
parent3d4c663ee68326990e0732a4aa76445688e1064e
http: don't pass the request options to Agent

The `options` that were being passed in before here are specific to a
single request, which kinda defeats the purpose of using an Agent in the
first place.

On a worse note, these `options` have not yet been "processed" by the
`http.ClientRequest` class, so if `port: null` is set (like it is as the
result of a `url.parse()` call), then they take preference over the
processed values since the agent's "options" get mixed in last in the
`createSocket()` function.

Fixes #6197.
Fixes #6199.
Closes #6231.
lib/_http_agent.js
test/simple/test-http-agent-false.js [new file with mode: 0644]