-
Notifications
You must be signed in to change notification settings - Fork 7.3k
https2 breaks compatibility with https1 #1531
Comments
The failing test case does create a connection to the registry, but it doesn't use TLS, it just sends a plain http request, which the server doesn't respond to, therefore nothing happens. My suggestion is to set a
|
another way is here. |
i'll get to this today, it's not a very difficult fix. |
please review @bnoordhuis or @isaacs or @ry |
@mmalecki - we would like to take your code but we require a contributor agreement, which can be signed electronically at http://nodejs.org/cla.html , before we can pull it into the repository. Be sure to integrate the test and assert that @mikeal's fix does indeed fix it. |
ok, much better fix now. in all conditions we get the options object to tls and http.js doesn't require() tls, ever. using net.connect() didn't work for me because, i think it's only there with a non-default configure option. also, @bnoordhuis yes, one line is 84 chars long, it looks way uglier if i break it up, there is a long line already in the file 20 lines up :) |
the test looks good. +1 |
Let ECONNRESET network errors bubble up so clients can detect them. Commit c4454d2 suppressed and turned them into regular end-of-stream events to fix the then-failing simple/test-regress-GH-1531 test. See also issue #1571 for (scant) details. It turns out that special handling is no longer necessary. Remove the special casing and let the error bubble up naturally. pummel/test-https-ci-reneg-attack and pummel/test-tls-ci-reneg-attack are updated because they expected an EPIPE error code that is now an ECONNRESET. Suppression of the ECONNRESET prevented the test from detecting that the connection has been severed whereupon the next write would fail with an EPIPE. Fixes #1776.
Let ECONNRESET network errors bubble up so clients can detect them. Commit c4454d2 suppressed and turned them into regular end-of-stream events to fix the then-failing simple/test-regress-GH-1531 test. See also issue nodejs#1571 for (scant) details. It turns out that special handling is no longer necessary. Remove the special casing and let the error bubble up naturally. pummel/test-https-ci-reneg-attack and pummel/test-tls-ci-reneg-attack are updated because they expected an EPIPE error code that is now an ECONNRESET. Suppression of the ECONNRESET prevented the test from detecting that the connection has been severed whereupon the next write would fail with an EPIPE. Fixes nodejs#1776.
Let ECONNRESET network errors bubble up so clients can detect them. Commit c4454d2 suppressed and turned them into regular end-of-stream events to fix the then-failing simple/test-regress-GH-1531 test. See also issue #1571 for (scant) details. It turns out that special handling is no longer necessary. Remove the special casing and let the error bubble up naturally. pummel/test-https-ci-reneg-attack and pummel/test-tls-ci-reneg-attack are updated because they expected an EPIPE error code that is now an ECONNRESET. Suppression of the ECONNRESET prevented the test from detecting that the connection has been severed whereupon the next write would fail with an EPIPE. Fixes #1776.
This bug was originally spotted in npm, issue isaacs/npm#1198.
When using new https2, callback from line https://github.com/isaacs/npm/blob/master/lib/utils/fetch.js#L87 doesn't get executed, because of set
agent
parameter.https2 checks only for
undefined
agent
value (https://github.com/joyent/node/blob/master/lib/https2.js#L69 ), while https1 checked forfalse
(https://github.com/joyent/node/blob/master/lib/https.js#L96 ) as well.(Spotted by @thejh)
Test case is here: https://gist.github.com/1145067
When node is running with --use-http1, everything works fine.
Also, I was told to @mikeal as he wrote https2.
The text was updated successfully, but these errors were encountered: