This channel never gets written to, but this only means that the mock
ResponseWriter will never signal a premature disconnect.
Based on feedback from #763.
Signed-off-by: Aaron Lehmann <aaron.lehmann@docker.com>
registry/storage/blob_test.go:149: arg d for printf verb %s of wrong type: github.com/docker/distribution.Descriptor
Signed-off-by: Doug Davis <dug@us.ibm.com>
It's necessary to compile the code first; otherwise go vet silently
fails to load imports.
Fixes#807.
Signed-off-by: Aaron Lehmann <aaron.lehmann@docker.com>
The response code isn't actually sent to the client, because the
connection has already closed by this point. But it causes the status
code to appear as 499 in the logs instead of 0.
Signed-off-by: Aaron Lehmann <aaron.lehmann@docker.com>
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>
Support for exposing the CloseNotifier interface was just recently added
to its logging handler wrappers. This is needed for #597.
Signed-off-by: Aaron Lehmann <aaron.lehmann@docker.com>
This is much better than downloading the builds with curl, because
Docker is intelligent about only pulling what it needs.
We use tagged versions of dind for the released version, and dind-master
for a master build.
Signed-off-by: Aaron Lehmann <aaron.lehmann@docker.com>
Add a run_multiversion.sh script that downloads a variety of Docker
engines and runs the integration tests against each of them.
Skip some of the tests when running with Docker 1.6.0. It has a bug that
prevents these tests from completing successfully.
Fixes#751
Signed-off-by: Aaron Lehmann <aaron.lehmann@docker.com>
Rename config.yml to dev-config.yml
Add example-config.yml, a simple configuration file for the official
This was originally made for the the distribution-library-image repo,
but is being moved here to make sure it stays in sync.
Update Dockerfile and docs for the rename.
Signed-off-by: Aaron Lehmann <aaron.lehmann@docker.com>
Change the minimum TLS version to TLS 1.0, and add a custom list of
ciphersuites which are thought to be the most secure options.
Signed-off-by: Aaron Lehmann <aaron.lehmann@docker.com>
includes the http response.
When debugging non-successful registry requests this will place
the error details and http status fields in the same log line
giving easier visibility to what error occured in the request.
Signed-off-by: Richard Scothern <richard.scothern@gmail.com>
Log a warning if the registry generates its own secret.
Update configuration doc, and remove the default secret from the
development config file.
Signed-off-by: Aaron Lehmann <aaron.lehmann@docker.com>
This passed in the #744 before merge, but apparently the test changed
since the PR was created in ways that led to a new failures.
Signed-off-by: Aaron Lehmann <aaron.lehmann@docker.com>
The UUID generation retries multiple times to read a full UUID, but
preserves any bytes of entropy he successfully managed to read between
retries.
Signed-off-by: Arnaud Porterie <arnaud.porterie@docker.com>