Adds functional options arguments to the Blobs Create method
Removes the Mount operation and instead implements this behavior as part of Create a From option is provided, which in turn returns a rich ErrBlobMounted indicating that a blob upload session was not initiated, but instead the blob was mounted from another repository Signed-off-by: Brian Bland <brian.bland@docker.com>
This commit is contained in:
@@ -735,6 +735,25 @@ the uploaded blob which may differ from the provided digest. Most clients may
|
||||
ignore the value but if it is used, the client should verify the value against
|
||||
the uploaded blob data.
|
||||
|
||||
If a mount fails due to invalid repository or digest arguments, the registry
|
||||
will fall back to the standard upload behavior and return a `202 Accepted` with
|
||||
the upload URL in the `Location` header:
|
||||
|
||||
```
|
||||
202 Accepted
|
||||
Location: /v2/<name>/blobs/uploads/<uuid>
|
||||
Range: bytes=0-<offset>
|
||||
Content-Length: 0
|
||||
Docker-Upload-UUID: <uuid>
|
||||
```
|
||||
|
||||
This behavior is consistent with older versions of the registry, which do not
|
||||
recognize the repository mount query parameters.
|
||||
|
||||
Note: a client may issue a HEAD request to check existence of a blob in a source
|
||||
repository to distinguish between the registry not supporting blob mounts and
|
||||
the blob not existing in the expected repository.
|
||||
|
||||
##### Errors
|
||||
|
||||
If an 502, 503 or 504 error is received, the client should assume that the
|
||||
|
@@ -735,6 +735,25 @@ the uploaded blob which may differ from the provided digest. Most clients may
|
||||
ignore the value but if it is used, the client should verify the value against
|
||||
the uploaded blob data.
|
||||
|
||||
If a mount fails due to invalid repository or digest arguments, the registry
|
||||
will fall back to the standard upload behavior and return a `202 Accepted` with
|
||||
the upload URL in the `Location` header:
|
||||
|
||||
```
|
||||
202 Accepted
|
||||
Location: /v2/<name>/blobs/uploads/<uuid>
|
||||
Range: bytes=0-<offset>
|
||||
Content-Length: 0
|
||||
Docker-Upload-UUID: <uuid>
|
||||
```
|
||||
|
||||
This behavior is consistent with older versions of the registry, which do not
|
||||
recognize the repository mount query parameters.
|
||||
|
||||
Note: a client may issue a HEAD request to check existence of a blob in a source
|
||||
repository to distinguish between the registry not supporting blob mounts and
|
||||
the blob not existing in the expected repository.
|
||||
|
||||
##### Errors
|
||||
|
||||
If an 502, 503 or 504 error is received, the client should assume that the
|
||||
|
Reference in New Issue
Block a user