Jakob Borg 39899e40bf cmd/syncthing: Use ReadAll + json.Unmarshal in places were we care about consuming the reader
Because json.NewDecoder(r).Decode(&v) doesn't necessarily consume all
data on the reader, that means an HTTP connection can't be reused. We
don't do a lot of HTTP traffic where we read JSON responses, but the
discovery is one such place. The other two are for POSTs from the GUI,
where it's not exactly critical but still nice if the connection still
can be keep-alive'd after the request as well.

Also ensure that we call req.Body.Close() for clarity, even though this
should by all accounts not really be necessary.

GitHub-Pull-Request: https://github.com/syncthing/syncthing/pull/3050
2016-05-06 22:01:56 +00:00
..
2015-10-27 09:55:05 +01:00
2016-05-04 19:38:12 +00:00
2016-05-04 19:38:12 +00:00
2016-05-04 19:38:12 +00:00
2016-05-04 19:38:12 +00:00
2016-04-16 22:44:07 +00:00
2016-05-04 19:38:12 +00:00
2016-04-09 01:10:31 +00:00
2015-09-22 19:38:46 +02:00
2016-04-16 22:44:07 +00:00