Logo
Explore Help
Sign In
1berry/nodejs
1
0
Fork 0
You've already forked nodejs
Code Issues Packages Projects Releases Wiki Activity
nodejs/test/parallel/test-pipe-abstract-socket-http.js

28 lines
505 B
JavaScript
Raw Permalink Normal View History

src: port Pipe to uv_pipe_bind2, uv_pipe_connect2 The introduction of the uv_pipe_bind2 and uv_pipe_connect2 methods in libuv v1.46.0 changed the behaviour of uv_pipe_bind and uv_pipe_connect. This broke the ability to connect to abstract domain sockets on linux. This change ports PipeWrap to use the new uv_pipe_bind2 and uv_pipe_connect2 methods to restore abstract domain socket support. Fixes: https://github.com/nodejs/node/issues/49656 Refs: https://github.com/libuv/libuv/pull/4030 PR-URL: https://github.com/nodejs/node/pull/49667 Reviewed-By: Santiago Gimeno <santiago.gimeno@gmail.com> Reviewed-By: Luigi Pinca <luigipinca@gmail.com> Reviewed-By: James M Snell <jasnell@gmail.com>
2023-09-18 03:11:22 -04:00
'use strict';
const common = require('../common');
const assert = require('assert');
const http = require('http');
if (!common.isLinux) common.skip();
const server = http.createServer(
common.mustCall((req, res) => {
res.end('ok');
})
);
server.listen(
'\0abstract',
common.mustCall(() => {
http.get(
{
socketPath: server.address(),
},
common.mustCall((res) => {
assert.strictEqual(res.statusCode, 200);
server.close();
})
);
})
);
Reference in New Issue Copy Permalink
Powered by Gitea Version: 1.23.8 Page: 1768ms Template: 3ms
English
Bahasa Indonesia Deutsch English Español Français Gaeilge Italiano Latviešu Magyar nyelv Nederlands Polski Português de Portugal Português do Brasil Suomi Svenska Türkçe Čeština Ελληνικά Български Русский Українська فارسی മലയാളം 日本語 简体中文 繁體中文(台灣) 繁體中文(香港) 한국어
Licenses API