distribution/registry
Ricardo Maraschini 87cbd09fa7 Ignore self reference object on empty prefix
When a given prefix is empty and we attempt to list its content AWS
returns that the prefix contains one object with key defined as the
prefix with an extra "/" at the end.

e.g.

If we call ListObjects() passing to it an existing but empty prefix,
say "my/empty/prefix", AWS will return that "my/empty/prefix/" is an
object inside "my/empty/prefix" (ListObjectsOutput.Contents).

This extra "/" causes the upload purging process to panic. On normal
circunstances we never find empty prefixes on S3 but users may touch
it.

Signed-off-by: Ricardo Maraschini <rmarasch@redhat.com>
2020-11-30 13:04:14 +01:00
..
api Merge pull request #2813 from lucab/ups/spec-json-binary 2019-03-01 14:26:54 -08:00
auth default autoredirect to false 2019-01-04 11:05:12 -08:00
client Remove empty Content-Type header 2020-11-03 12:24:02 +01:00
handlers Bump Redigo to v1.8.2. 2020-08-31 18:07:54 -07:00
listener [Server] Listen and serve on a unix socket 2015-05-11 16:00:14 +03:00
middleware context: remove definition of Context 2017-08-11 15:53:31 -07:00
proxy clean up code because err is always nil 2020-07-22 10:54:46 +08:00
storage Ignore self reference object on empty prefix 2020-11-30 13:04:14 +01:00
doc.go Move initialization code from main.go to the registry package 2015-09-09 14:39:31 -07:00
registry.go Migrate to golangci-lint 2020-02-14 08:11:16 +11:00
registry_test.go Add support to gracefully shutdown the server 2018-08-20 10:01:26 -07:00
root.go add possibility to clean untagged manifests 2018-01-05 12:20:01 +02:00