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: requests with empty paths redirect instead of 200 #10586
Comments
More info please. It's unclear whether you mean your browser doing this (in which case it's not even a redirect), or ServeMux, etc. And if ServeMux, with or without hostnames in the pattern. |
The browsers and curl are doing it. It happens with both hostnames and no hostname in the pattern. I have a patch to propose. |
I still don't understand so I'm curious to see your patch. |
This is a problem in using NewRequest in the tests, not here. Confirmation I thought I had done was not done. Sorry for the noise. |
There's an open documentation bug for that already. |
Requests to "http://example.com" (no trailing slash) always redirect to "http://example.com/" even if there is a "/" handler available. Other servers will match the lack of path with the "/" handler as expected.
The text was updated successfully, but these errors were encountered: