-
Notifications
You must be signed in to change notification settings - Fork 18k
net/http: 301 instead of 404 for unmatched requests #65624
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
Labels
FrozenDueToAge
NeedsInvestigation
Someone must examine and confirm this is a valid issue and not a duplicate of an existing one.
Comments
Change https://go.dev/cl/562557 mentions this issue: |
ezz-no
pushed a commit
to ezz-no/go-ezzno
that referenced
this issue
Feb 18, 2024
Do not add a trailing slash and redirect if the path already ends in a slash. Also, and unrelatedly, add a test for cleanPath. Fixes golang#65624. Change-Id: Ifcf9edc929d2eb6db88132c09d2bade85c5dda3d Reviewed-on: https://go-review.googlesource.com/c/go/+/562557 Reviewed-by: Damien Neil <[email protected]> LUCI-TryBot-Result: Go LUCI <[email protected]>
This was referenced Dec 10, 2024
Sign up for free
to subscribe to this conversation on GitHub.
Already have an account?
Sign in.
Labels
FrozenDueToAge
NeedsInvestigation
Someone must examine and confirm this is a valid issue and not a duplicate of an existing one.
Go version
go version go1.22.0 linux/amd64
Output of
go env
in your module/workspace:What did you do?
https://go.dev/play/p/obFHzvRU_DL
Register a pattern, and make a request to a prefix of the pattern
What did you see happen?
When used with an http client, this results in a redirect loop (get
/
, redirected to/
)What did you expect to see?
Return a 404 for no matching routes.
The text was updated successfully, but these errors were encountered: