Closed jonathanong closed 10 years ago
Repro code? Nothing has changed as of recently AFAIK
don't have repo code. just a test in cojs/cogent: https://github.com/cojs/cogent/commit/ec707e28f6d59c3b66be91d228161f2f5f008a6c
not sure what's going on. works in 0.11.11 but fails in 0.11.12. getting:
Error: Protocol:https: not supported.
at new ClientRequest (_http_client.js:70:11)
at Object.exports.request (http.js:52:10)
at Object.exports.request (https.js:136:15)
at Context.request (/Users/jong/Workspace/cogent/lib/index.js:167:39)
at next (/Users/jong/Workspace/cogent/node_modules/co/index.js:93:21)
at Context.<anonymous> (/Users/jong/Workspace/cogent/node_modules/co/index.js:50:5)
at Test.Runnable.run (/Users/jong/Workspace/cogent/node_modules/mocha/lib/runnable.js:196:15)
at Runner.runTest (/Users/jong/Workspace/cogent/node_modules/mocha/lib/runner.js:374:10)
at /Users/jong/Workspace/cogent/node_modules/mocha/lib/runner.js:452:12
at next (/Users/jong/Workspace/cogent/node_modules/mocha/lib/runner.js:299:14)
at /Users/jong/Workspace/cogent/node_modules/mocha/lib/runner.js:309:7
at next (/Users/jong/Workspace/cogent/node_modules/mocha/lib/runner.js:247:23)
at Immediate._onImmediate (/Users/jong/Workspace/cogent/node_modules/mocha/lib/runner.js:276:5)
at processImmediate [as _immediateCallback] (timers.js:374:17)
oh my god i just looked at the code. you added it :P any reason agent protocol must match request protocol's?
Ok, shit, thanks for the report. Looking into it.
Ok, can repro. It seems I (unintentionally) introduced a slight behavior change in https://github.com/joyent/node/commit/d6bbb19f1d1d6397d862d09304bc63c476f675c1...
With that commit, any agent
instance must have a protocol
field set to "http:" or "https:" (depending on which core module you were using)... We should probably fix this in node, or failing that, I'll have the agent-base
module have a default protocol
field based on the secureEndpoint
field or something.
Thanks for the report in any case! We'll get this sorted out.
@jonathanong See https://github.com/joyent/node/pull/7351
In short, v0.11.12 is botched, wait for v0.11.13 for the proper fix (and/or use v0.11.11 for now).
@jonathanong Ok, so https://github.com/joyent/node/commit/9f23fe11418b66ab5812bed61e207af4e8f18efb fixes the problem. Closing this issue now. Cheers!
Woot!
suddenly getting this error as of 0.11.12 when i'm proxying https requests over an http proxy. am i doing things wrong? or do you have to change something?