-
Notifications
You must be signed in to change notification settings - Fork 18k
x/net/http: panic when route ends with '/' #36275
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
Milestone
Comments
Here's a play.golang.org link, though it fails for another reason
|
|
You've got a nil pointer,
|
ah sorry about that, thank you all |
told ya it wasn't a bug @AlexDvorak |
Sign up for free
to subscribe to this conversation on GitHub.
Already have an account?
Sign in.
What version of Go are you using (
go version
)?Does this issue reproduce with the latest release?
What operating system and processor architecture are you using (
go env
)?go env
OutputWhat did you do?
and then I ran
curl 'localhost:8000/static/'
which resulted in this response from the server
this example works properly when the route is "/static" and returns a
404 Page not found
What did you expect to see?
I expected to see a
404 Page not found
response when I rancurl 'localhost:8000/static/'
What did you see instead?
instead,
/usr/lib/go-1.13/src/net/http/server.go
failed on line 1767 with the above messagehere are the lines surrounding it:
The text was updated successfully, but these errors were encountered: