distribution/registry/handlers
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
..
api_test.go Fix for api_test.go 2015-07-28 10:59:11 -07:00
app.go Merge pull request #740 from stevvooe/disable-storage-redirects 2015-07-30 14:28:31 -07:00
app_test.go Allow disabling of starage driver redirects 2015-07-24 16:59:35 -07:00
basicauth.go Move registry package into handler package 2015-02-10 17:25:40 -08:00
basicauth_prego14.go Move registry package into handler package 2015-02-10 17:25:40 -08:00
blob.go Manifest and layer soft deletion. 2015-07-24 09:57:20 -07:00
blobupload.go Use CloseNotifier to supress spurious HTTP 400 errors on early disconnect 2015-07-31 17:30:26 -07:00
catalog.go Create Repositories method 2015-07-21 21:45:14 -07:00
context.go Create Repositories method 2015-07-21 21:45:14 -07:00
helpers.go Export ServeJSON for serving error codes 2015-07-16 12:14:14 -07:00
hmac.go Refactor Blob Service API 2015-05-15 17:05:18 -07:00
hmac_test.go Refactor Blob Service API 2015-05-15 17:05:18 -07:00
hooks.go Feature: Web Panic Reporting via hooks 2015-05-31 14:21:22 +00:00
images.go Use CloseNotifier to supress spurious HTTP 400 errors on early disconnect 2015-07-31 17:30:26 -07:00
mail.go Feature: Web Panic Reporting via hooks 2015-05-31 14:21:22 +00:00
tags.go Allow Manifest Service to be configured with function arguments 2015-07-15 12:25:16 -07:00