-
Notifications
You must be signed in to change notification settings - Fork 30k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Upgrade openssl sources to 1.0.2h broke npm install for me (behind proxy) #7880
Comments
Yep that sounds spot on. Can you suggest a better title for this issue? |
@julbra Can you post the output of |
@bnoordhuis |
Maybe there is some missing context but the reply from the proxy server is a bit strange:
Can you retry with |
Thanks. What I see is this:
The 200 response is received and then something in the node process closes the connection, without seemingly reading any data. What does |
@bnoordhuis here it is.
|
Thanks. Okay, I think the conclusion has to be that node doesn't like the response from the proxy (the exception bubbles up from core) but I don't understand why, because I can't reproduce locally. A test script: 'use strict';
const http = require('http');
const net = require('net');
const server = net.createServer(onconnection).listen(8000, onlisten);
function onconnection(conn) {
conn.pipe(process.stderr);
conn.write('HTTP/1.1 200 Connection established\r\n\r\n');
setTimeout(() => conn.end('ok\n'), 50);
}
function onlisten() {
const req = http.request({
method: 'CONNECT',
host: '127.0.0.1',
path: 'example.org:443',
port: 8000,
headers: {'Connection': 'close'},
});
req.on('connect', function(res, conn, head) {
conn.pipe(process.stdout);
server.close();
});
req.end();
} |
I forgot to mention that it is possible that tunnel-agent or request intercepts the raw TCP data and does something with it that makes the http parser reject it. That is something I can't easily check though, too many lines of code to go through. |
@bnoordhuis Ok thanks for your time. I wish I could give you access to the machine, but obviously it is behind the proxy! |
v6.9.0 still shows exactly the same problem 😢 EDIT: @bnoordhuis whoops this only affects when I build from source (the default on Gentoo). |
Only affects Gentoo build! |
With any version of node that contains the upgrade to openssl sources 1.0.2h, npm install fails with the following error:
Error: tunneling socket could not be established, cause=Parse Error
It only affects https traffic. My proxy settings are correct and have worked for years.
If I downgrade to any version prior this patch it works again. For example v5.10.0 works, v6.1.0+ and v5.11.0+ don't work.
Let me know if further information might help debug this issue. It may be something unusual on my system but any help would be greatly appreciated.
The text was updated successfully, but these errors were encountered: