forked from TrueCloudLab/distribution
f089932de0
Several storage drivers and storage middlewares need to introspect the client HTTP request in order to construct content-redirect URLs. The request is indirectly passed into the driver interface method URLFor() through the context argument, which is bad practice. The request should be passed in as an explicit argument as the method is only called from request handlers. Replace the URLFor() method with a RedirectURL() method which takes an HTTP request as a parameter instead of a context. Drop the options argument from URLFor() as in practice it only ever encoded the request method, which can now be fetched directly from the request. No URLFor() callers ever passed in an "expiry" option, either. Signed-off-by: Cory Snider <csnider@mirantis.com> |
||
---|---|---|
.. | ||
cache | ||
driver | ||
blob_test.go | ||
blobserver.go | ||
blobstore.go | ||
blobwriter.go | ||
blobwriter_nonresumable.go | ||
blobwriter_resumable.go | ||
catalog.go | ||
catalog_test.go | ||
doc.go | ||
error.go | ||
filereader.go | ||
filereader_test.go | ||
garbagecollect.go | ||
garbagecollect_test.go | ||
io.go | ||
linkedblobstore.go | ||
linkedblobstore_test.go | ||
manifestlisthandler.go | ||
manifeststore.go | ||
manifeststore_test.go | ||
ociindexhandler.go | ||
ocimanifesthandler.go | ||
ocimanifesthandler_test.go | ||
paths.go | ||
paths_test.go | ||
purgeuploads.go | ||
purgeuploads_test.go | ||
registry.go | ||
schema2manifesthandler.go | ||
schema2manifesthandler_test.go | ||
tagstore.go | ||
tagstore_test.go | ||
vacuum.go |