Subdomains on localhost return ENOTFOUND on some OS.
オープン
まだ誰も着手していません。
dns
- 主要言語
- JavaScript
- スター
- 122k
- フォーク
- 37.3k
- 平均マージ
- 4日 2時間
- マージ済み PR(30日)
- 283
説明
Version
Tested on v21.2.0, v20.9.0, v18.18.2
Platform
Microsoft Windows NT 10.0.19045.0 x64
Subsystem
No response
What steps will reproduce the bug?
- run
fetch("http://test.localhost/")
How often does it reproduce? Is there a required condition?
Happens on windows every time
What is the expected behavior? Why is that the expected behavior?
Expected behaviour is ECONNREFUSED or content of what the webpage contains equally to how a node on Linux, cURL or a browser would handle it
What do you see instead?
Uncaught [TypeError: fetch failed] {
cause: Error: getaddrinfo ENOTFOUND test.localhost
at GetAddrInfoReqWrap.onlookupall [as complete] (node:dns:118:26)
at GetAddrInfoReqWrap.callbackTrampoline (node:internal/async_hooks:130:17) {
errno: -3008,
code: 'ENOTFOUND',
syscall: 'getaddrinfo',
hostname: 'test.localhost'
}
}
Additional information
Recreated locally in a VM but also on an actual Windows device
コントリビューションガイド
はじめの一歩
- issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
- 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
- リポジトリをフォークし、ブランチを切って変更します。
- issue 番号を参照したプルリクエストを送ります。
調査の方向性
まず Windows で fetch("http://test.localhost/") を再現し、test.localhost に対して ENOTFOUND を発生させる node:dns の名前解決パスを調査します。Linux、cURL、またはブラウザーと動作を比較し、Windows の動作が期待される localhost の処理と一致し、リグレッションカバレッジが追加された時点で issue の完了とします。
索引モデルが issue の本文から書いたものです。
評価
- 技術スタック
- javascript, nodejs
- 領域
- networking
- issue の種類
- バグ
- 難易度
- 4/5
- 見積もり時間
- 3〜5日
- 活発さ
- 活発
- 明瞭さ
- おおむね明確
- 初心者へのやさしさ
- 48/100