Aaron Lehmann 6cb5670ba5 Use CloseNotifier to supress spurious HTTP 400 errors on early disconnect
When a client disconnects without completing a HTTP request, we were
attempting to process the partial request, which usually leads to a 400
error. These errors can pollute the logs and make it more difficult to
track down real bugs.

This change uses CloseNotifier to detect disconnects. In combination
with checking Content-Length, we can detect a disconnect before sending
the full payload, and avoid logging a 400 error.

This logic is only applied to PUT, POST, and PATCH endpoints, as these
are the places where disconnects during a request are most likely to
happen.

Signed-off-by: Aaron Lehmann <aaron.lehmann@docker.com>
2015-07-31 17:30:26 -07:00
..
2015-07-28 10:59:11 -07:00
2015-07-24 09:57:20 -07:00
2015-07-21 21:45:14 -07:00
2015-07-21 21:45:14 -07:00
2015-05-15 17:05:18 -07:00
2015-05-15 17:05:18 -07:00
2015-05-31 14:21:22 +00:00