If I call req.socket.address() on an HTTP2 request I get an empty object as result instead of the socket address.
Root cause seems to be that Handle.prototype.getsockname() is providing the result as return value whereas NodeJs interprets the return value as error and requires the result in object passed as first argument.
see net.js:
Socket.prototype._getsockname = function() {
if (!this._handle || !this._handle.getsockname) {
return {};
}
if (!this._sockname) {
var out = {};
var err = this._handle.getsockname(out);
if (err) return {}; // FIXME(bnoordhuis) Throw?
this._sockname = out;
}
return this._sockname;
};
If I call
req.socket.address()
on an HTTP2 request I get an empty object as result instead of the socket address. Root cause seems to be thatHandle.prototype.getsockname()
is providing the result as return value whereas NodeJs interprets the return value as error and requires the result in object passed as first argument. see net.js: