syncthing/lib/discover
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
..
cache_test.go lib/connections: Refactor 2016-05-04 19:38:12 +00:00
cache.go lib/connections: Refactor 2016-05-04 19:38:12 +00:00
debug.go Implement facility based logger, debugging via REST API 2015-10-03 18:09:53 +02:00
discover.go lib/connections: Refactor 2016-05-04 19:38:12 +00:00
doc.go Fix typos. 2015-11-11 21:20:34 -05:00
global_test.go lib/connections: Refactor 2016-05-04 19:38:12 +00:00
global.go cmd/syncthing: Use ReadAll + json.Unmarshal in places were we care about consuming the reader 2016-05-06 22:01:56 +00:00
local.go lib/connections: Refactor 2016-05-04 19:38:12 +00:00
localpackets_xdr.go lib/connections: Refactor 2016-05-04 19:38:12 +00:00
localpackets.go lib/connections: Refactor 2016-05-04 19:38:12 +00:00