-
Notifications
You must be signed in to change notification settings - Fork 2.7k
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
Fixes #12182 - update default port when server is created #12201
Fixes #12182 - update default port when server is created #12201
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We cannot change this default in server.zig (nor should we), as that is a breaking change. If you’d like to change this to match node behavior, then it should be changed in node:http
@Jarred-Sumner got it, thanks! Sorry, about that. I wasn't aware that was the default node behavior, just saw an open issue and wanted to support. Love what you're doing here! Just updated it in node:http instead. Also, any chance you're able to point me in the right direction for #7716? I don't know a thing about Zig, but could be something fun to dig into with when i've got some downtime. |
38247e8
to
c3e8e9a
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks for submitting a PR! I leave some minor comments on the tests to make them less flaky.
c3e8e9a
to
cb43ad3
Compare
cb43ad3
to
292b1a4
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks!
What does this PR do?
This PR sets the default port to 0, which will allow the OS to assign an available ephemeral port when the server is not instructed to use a specific port resolving
Fixes #12182
How did you verify your code works?
build/bun-debug test test/js/node/http/node-http.test.ts
)