net/http: NewRequest panics when given a nil instance of *strings.Reader #41713
Comments
I don't think there's anything to be done here. Passing a nil *strings.Reader is a clear programming error as noted by the nil pointer dereference panic, regardless of the HTTP method. |
Then why does passing |
Closing because this does not seem to be a bug. Please comment if you disagree. |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
What version of Go are you using (
go version
)?Does this issue reproduce with the latest release?
Yes
What operating system and processor architecture are you using (
go env
)?go env
OutputWhat did you do?
Playground: https://play.golang.org/p/5DED9DdFmld
Code in-case playground doesn't work:
What did you expect to see?
It to work, as GET requests wouldn't have bodies.
What did you see instead?
A panic as it tries to, assumedly, execute this line:
The text was updated successfully, but these errors were encountered: