forked from TrueCloudLab/distribution
6cb5670ba5
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> |
||
---|---|---|
.. | ||
api_test.go | ||
app.go | ||
app_test.go | ||
basicauth.go | ||
basicauth_prego14.go | ||
blob.go | ||
blobupload.go | ||
catalog.go | ||
context.go | ||
helpers.go | ||
hmac.go | ||
hmac_test.go | ||
hooks.go | ||
images.go | ||
mail.go | ||
tags.go |