Skip to content

fix: exposeHeadRoute should pass "onSend" hook handlers provided to GET handler if method is not uppercased#5766

Merged
Uzlopak merged 7 commits into
mainfrom
fix-route-method
Oct 25, 2024
Merged

fix: exposeHeadRoute should pass "onSend" hook handlers provided to GET handler if method is not uppercased#5766
Uzlopak merged 7 commits into
mainfrom
fix-route-method

Conversation

@Uzlopak

@Uzlopak Uzlopak commented Oct 24, 2024

Copy link
Copy Markdown
Contributor

While investigating #5762 I realized that there is an issue when passing lower case methods to the route fn. You could run the test "Will pass onSend hook to HEAD method if exposeHeadRoutes is true /2" on main branch and see that it fails.

Also makes the typings less strict regarding the method attribute as CONNECT or OPTION could be added via acceptHTTPMethod,

Also tries to fail faster.

Requesting review by @climba03003 regarding the exposeHeadRequest logic.
Requesting review by @Eomm regarding the acceptHTTPMethod aspect

@github-actions github-actions Bot added the typescript TypeScript related label Oct 24, 2024
@Uzlopak Uzlopak requested review from Eomm and climba03003 and removed request for climba03003 October 24, 2024 14:04
Signed-off-by: Aras Abbasi <aras.abbasi@googlemail.com>
@Uzlopak Uzlopak removed the typescript TypeScript related label Oct 24, 2024

@mcollina mcollina left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

lgtm

Comment thread lib/route.js Outdated
@Eomm Eomm added the bugfix Issue or PR that should land as semver patch label Oct 25, 2024
Uzlopak and others added 2 commits October 25, 2024 16:37
Co-authored-by: Manuel Spigolon <behemoth89@gmail.com>
Signed-off-by: Aras Abbasi <aras.abbasi@googlemail.com>
@github-actions github-actions Bot added the typescript TypeScript related label Oct 25, 2024
@Uzlopak

Uzlopak commented Oct 25, 2024

Copy link
Copy Markdown
Contributor Author

@Eomm ptal

@Uzlopak Uzlopak merged commit d59ed98 into main Oct 25, 2024
@Uzlopak Uzlopak deleted the fix-route-method branch October 25, 2024 15:37
@github-actions

Copy link
Copy Markdown

This pull request has been automatically locked since there has not been any recent activity after it was closed. Please open a new issue for related bugs.

@github-actions github-actions Bot locked as resolved and limited conversation to collaborators Oct 26, 2025
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

bugfix Issue or PR that should land as semver patch typescript TypeScript related

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants