syncthing/lib
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
..
auto build: Generate gui.files.go on the fly, remove from repo 2016-03-28 10:03:13 +00:00
beacon Remove unused struct field 2015-10-27 09:55:05 +01:00
config cmd/syncthing: Use ReadAll + json.Unmarshal in places were we care about consuming the reader 2016-05-06 22:01:56 +00:00
connections lib/connections: Refactor 2016-05-04 19:38:12 +00:00
db cmd/syncthing: Don't compact database at startup 2016-04-22 07:34:11 +00:00
dialer lib/dialer: Add env var to disable proxy fallback (fixes #3006) 2016-04-24 16:30:20 +00:00
discover cmd/syncthing: Use ReadAll + json.Unmarshal in places were we care about consuming the reader 2016-05-06 22:01:56 +00:00
events lib/connections: Refactor 2016-05-04 19:38:12 +00:00
ignore lib/ignore: Handle bare commas in ignore patterns (fixes #3042) 2016-05-06 15:45:11 +00:00
logger cmd/syncthing: Extract interfaces for things the API depends on 2016-03-21 19:36:08 +00:00
model lib/connections: Refactor 2016-05-04 19:38:12 +00:00
nat lib/connections: Refactor 2016-05-04 19:38:12 +00:00
osutil lib/upnp: Fix port order 2016-04-16 22:44:07 +00:00
pmp lib/{nat,pmp}: Fix shadowing and nil IPs 2016-04-16 16:48:07 +00:00
protocol lib/protocol: Add Request benchmarks over raw and TLS encrypted TCP channels 2016-05-04 23:07:07 +00:00
rc cmd/stbench: Add utility to run benchmark tests 2016-03-25 20:52:20 +00:00
relay lib/connections: Refactor 2016-05-04 19:38:12 +00:00
scanner all: Dead code cleanup 2016-04-09 01:10:31 +00:00
signature The PublicKey() method is an addition in Go 1.4 2015-10-27 16:03:14 +01:00
stats We should pass around db.Instance instead of leveldb.DB 2015-10-31 12:35:30 +01:00
symlinks Fix import paths 2015-09-22 19:38:46 +02:00
sync lib/sync: Skip the timing tests if the host timer is flaky 2016-03-27 10:41:38 +00:00
tlsutil Generate ECDSA keys instead of RSA 2015-11-27 09:15:12 +01:00
upgrade lib/upgrade: Don't attempt processing files larger than expected max binary size (ref #3045) 2016-05-06 14:14:19 +00:00
upnp lib/upnp: Fix port order 2016-04-16 22:44:07 +00:00
util lib/nat: Add a nat package and service to track mappings on multiple IGDs 2016-04-10 19:36:38 +00:00
versioner lib/versioner: Refactor for testing, speed up test 2016-04-15 14:26:39 +00:00