http.request socketPath doesn't work on Windows
Nobody has claimed this yet.
- Dominant language
- JavaScript
- Stars
- 122k
- Forks
- 37.3k
- Avg merge
- 4d 2h
- Merged PRs (30d)
- 283
Description
When calling http.request with the socketPath option on Windows in order to try to connect to a Unix domain socket, I get the following error message:
Error: connect ENOTSOCK C:\Users\User\AppData\Local\Temp\test.sock
at PipeConnectWrap.afterConnect [as oncomplete] (net.js:1141:16)
There is native Unix Domain Sockets support in Windows 10 since two years, and the documentation at https://nodejs.org/api/http.html gives no indication that socketPath doesn't work on Windows, so I guess that this can be considered as an error.
- Version: 12.16.3 (comes with Electron 10.1.0)
- Platform: Windows 10, 64-bit, Build 18362.19h1_release.190318-1202
- Subsystem: http
What steps will reproduce the bug?
Call http.request with the socketPath option on Windows. Specify a Unix domain socket path.
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start with the http.request entry point and its socketPath handling, using the net.js:1141:16 stack location and the Windows 10 reproduction described in the report. Verify behavior with a Unix domain socket on Windows; done means the documented socketPath behavior matches the supported platform behavior and the reported ENOTSOCK failure is addressed.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- javascript, node.js
- Domain
- networking
- Issue type
- Bug
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Quiet
- Clarity
- Mostly clear
- Newbie friendliness
- 55/100