distribution/context
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
..
context.go Move context once to instanceContext from global scope 2015-07-30 13:59:44 -07:00
doc.go Context package to support context-aware logging 2015-02-06 16:20:38 -08:00
http_test.go Use CloseNotifier to supress spurious HTTP 400 errors on early disconnect 2015-07-31 17:30:26 -07:00
http.go Use CloseNotifier to supress spurious HTTP 400 errors on early disconnect 2015-07-31 17:30:26 -07:00
logger.go Only enable uuid generation warning when using registry handlers 2015-07-30 14:27:07 -07:00
trace_test.go Contextual tracing support for logs 2015-04-10 16:42:30 -07:00
trace.go Replace uuid dependency with internal library 2015-05-22 18:59:41 -07:00
util.go Improve context package 2015-04-01 15:40:21 -07:00