Skip to content

HTTP server listen fixes #2146

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 2 commits into from
Oct 7, 2020
Merged

HTTP server listen fixes #2146

merged 2 commits into from
Oct 7, 2020

Conversation

code-asher
Copy link
Member

  • Port 80 didn't work with bind-addr
  • [::] didn't work

@code-asher code-asher requested a review from nhooyr as a code owner September 30, 2020 17:41
@code-asher code-asher changed the title Small listen fixes HTTP server listen fixes Sep 30, 2020
@code-asher code-asher linked an issue Sep 30, 2020 that may be closed by this pull request
Copy link
Contributor

@nhooyr nhooyr left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🚀

@@ -401,7 +401,10 @@ export async function readConfigFile(configPath?: string): Promise<Args> {

function parseBindAddr(bindAddr: string): [string, number] {
const u = new URL(`http://${bindAddr}`)
return [u.hostname, parseInt(u.port, 10)]
// With the http scheme 80 will be dropped so assume it's 80 if missing. This
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Nice catch!

@code-asher code-asher merged commit 548a35c into master Oct 7, 2020
@code-asher code-asher deleted the listen branch October 7, 2020 17:50
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Listening on INADDR6_ANY not possible
2 participants