Skip to content

fix(ext/node): support shouldUpgradeCallback in http server#34092

Open
bartlomieju wants to merge 2 commits into
denoland:mainfrom
bartlomieju:fix-node-http-should-upgrade-callback
Open

fix(ext/node): support shouldUpgradeCallback in http server#34092
bartlomieju wants to merge 2 commits into
denoland:mainfrom
bartlomieju:fix-node-http-should-upgrade-callback

Conversation

@bartlomieju
Copy link
Copy Markdown
Member

Adds Node-compatible shouldUpgradeCallback handling to node:http servers.

The server now validates a user-provided callback, installs Node's default callback that upgrades only when an upgrade listener exists, and consults the callback before committing requests to the upgrade path.

Also enables the passing HTTP upgrade compat tests in tests/node_compat/config.jsonc.

Tests:

  • ./x test-compat test-http-upgrade-server-callback.js
  • ./x test-compat test-http-upgrade-server.js

@bartlomieju bartlomieju changed the title fix(node): support shouldUpgradeCallback in http server fix(ext/node): support shouldUpgradeCallback in http server May 15, 2026
@bartlomieju
Copy link
Copy Markdown
Member Author

@lunadogbot review this

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.

1 participant