-
Notifications
You must be signed in to change notification settings - Fork 17.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
net/http: http.ServerMux, paths ending in * wildcard are not recognized. #68856
Comments
tatang26
changed the title
net/http: Paths with * wildcard are not being
net/http: http.ServerMux, paths ended in * wildcard are not recognized
Aug 13, 2024
tatang26
changed the title
net/http: http.ServerMux, paths ended in * wildcard are not recognized
net/http: http.ServerMux, paths ending in * wildcard are not recognized.
Aug 13, 2024
Nowhere in the go docs is * suggested as a wildcard. |
Thanks @seankhliao ! |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Go version
go version go1.23rc2 darwin/arm64
Output of
go env
in your module/workspace:What did you do?
In Go 1.23, it appears that http.ServeMux is not interpreting correctly the * character as a wildcard in route patterns. Instead, * is being treated as a literal path segment, which leads to unexpected behavior. For instance, I have this route
And when I make a call like:
What did you see happen?
I expect the file is served in my web app
What did you expect to see?
I get a
404 page not found
but if I make a request like:
In Go.122 works well
The text was updated successfully, but these errors were encountered: