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

Bad option mux.Message.Path() returns invalid utf-8 strings instead of error #594

Open
palsivertsen opened this issue Dec 9, 2024 · 1 comment
Labels
bug Something isn't working

Comments

@palsivertsen
Copy link

The mux.Message.Path() method returns an invalid utf-8 string when the path option contain invalid bytes instead of an error.

This bug happened for incoming requests where the path option was set to []byte{0xbf, 'g'} (0xbf is not valid utf-8 encoding).

This example in the go playground demonstrates the issue.

@jkralik jkralik added the bug Something isn't working label Dec 9, 2024
@jkralik
Copy link
Member

jkralik commented Dec 9, 2024

Thank you for the reporting issue. If you have a fix with a test we can merge it.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants