Closed
Description
Code
http://play.golang.org/p/DPZUao3rPB
Should output (and does under Go 1.4)
Decoding with bytes.Buffer: <nil>, {"bar"}
Decoding with http stream: <nil>, {"bar"}
Decoding with http stream bouncing on bytes.Buffer: <nil>, {"bar"}
Yes, "{ \"foo\": \"bar\" }" really is "{ \"foo\": \"bar\" }"
With tip(129cfa2) outputs
$ go run lalatest.go
Decoding with bytes.Buffer: <nil>, {"bar"}
Decoding with http stream: EOF, {""}
Decoding with http stream bouncing on bytes.Buffer: <nil>, {"bar"}
Yes, "{ \"foo\": \"bar\" }" really is "{ \"foo\": \"bar\" }"
Expected
not EOF. Doesn't matter which io.Reader it's read from, it should either be seen as valid or it shouldn't.