Skip to content

http.request socketPath doesn't work on Windows #35008

Description

@sschultze

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.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    blockedPRs that are blocked by other issues or PRs.httpIssues and PRs related to the http subsystem.windowsIssues and PRs related to the Windows platform.

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions