You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
$ 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.
The text was updated successfully, but these errors were encountered:
ianlancetaylor
changed the title
json decoding fails from httptest in tip, works in 1.4 and over bytes.Buffer
net/http: json decoding fails from httptest in tip, works in 1.4 and over bytes.Buffer
Jul 27, 2015
Code
http://play.golang.org/p/DPZUao3rPB
Should output (and does under Go 1.4)
With tip(129cfa2) outputs
Expected
not EOF. Doesn't matter which io.Reader it's read from, it should either be seen as valid or it shouldn't.
The text was updated successfully, but these errors were encountered: