Skip to content
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

Investigation for the feasability of having a pluggable HTTP router #216

Closed
mantzas opened this issue May 21, 2020 · 2 comments
Closed

Investigation for the feasability of having a pluggable HTTP router #216

mantzas opened this issue May 21, 2020 · 2 comments
Labels
question Further information is requested requirements gathering
Milestone

Comments

@mantzas
Copy link

mantzas commented May 21, 2020

Is your feature request related to a problem? Please describe

We are using httprouter hardcoded in our codebase. But it has limitations and we could investigate to make the HTTP router part pluggable.
We can provide after this a way to let the end-user decide which one they want to support.

@mantzas mantzas added question Further information is requested requirements gathering labels May 21, 2020
@fpapadopou
Copy link

fpapadopou commented May 23, 2020

Some more details about the current http router's limitations:
The httprouter is very strict when interpreting route path segments. Consider the following

    router.GET("/user/:id_user", nil)
    router.GET("/user/me/:profile", nil)

In the above case, the me static route segment conflicts with the :id_user wildcard, which will result in a a panic error.

The issue has been reported here and will be addressed in version 2 of the httprouter library. Still, "lenient" interpretation of route segments will be an optional feature.

In the meantime, if you happen have the above issue, you can try sth like this.

@tpaschalis tpaschalis added this to the Unplanned milestone Oct 20, 2020
@mantzas
Copy link
Author

mantzas commented Mar 5, 2022

HTTP v2 support this OOTB.

@mantzas mantzas closed this as completed Mar 5, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
question Further information is requested requirements gathering
Projects
None yet
Development

No branches or pull requests

3 participants