Specify and implement Docker-Upload-UUID
This changeset adds support for a header to identify docker upload uuids. This id can be used as a key to manage local state for resumable uploads. The goal is remove the necessity for a client to parse the url to get an upload uuid. The restrictions for clients to use the location header are still strongly in place. Signed-off-by: Stephen J Day <stephen.day@docker.com>
This commit is contained in:
parent
00ce453315
commit
32f5965c06
3 changed files with 48 additions and 11 deletions
|
@ -72,6 +72,13 @@ var (
|
|||
Format: "0",
|
||||
}
|
||||
|
||||
dockerUploadUUIDHeader = ParameterDescriptor{
|
||||
Name: "Docker-Upload-UUID",
|
||||
Description: "Identifies the docker upload uuid for the current request.",
|
||||
Type: "uuid",
|
||||
Format: "<uuid>",
|
||||
}
|
||||
|
||||
unauthorizedResponse = ResponseDescriptor{
|
||||
Description: "The client does not have access to the repository.",
|
||||
StatusCode: http.StatusUnauthorized,
|
||||
|
@ -898,6 +905,7 @@ var routeDescriptors = []RouteDescriptor{
|
|||
Format: "<blob location>",
|
||||
},
|
||||
contentLengthZeroHeader,
|
||||
dockerUploadUUIDHeader,
|
||||
},
|
||||
},
|
||||
},
|
||||
|
@ -941,6 +949,7 @@ var routeDescriptors = []RouteDescriptor{
|
|||
Format: "0-0",
|
||||
Description: "Range header indicating the progress of the upload. When starting an upload, it will return an empty range, since no content has been received.",
|
||||
},
|
||||
dockerUploadUUIDHeader,
|
||||
},
|
||||
},
|
||||
},
|
||||
|
@ -994,6 +1003,7 @@ var routeDescriptors = []RouteDescriptor{
|
|||
Description: "Range indicating the current progress of the upload.",
|
||||
},
|
||||
contentLengthZeroHeader,
|
||||
dockerUploadUUIDHeader,
|
||||
},
|
||||
},
|
||||
},
|
||||
|
@ -1077,6 +1087,7 @@ var routeDescriptors = []RouteDescriptor{
|
|||
Description: "Range indicating the current progress of the upload.",
|
||||
},
|
||||
contentLengthZeroHeader,
|
||||
dockerUploadUUIDHeader,
|
||||
},
|
||||
},
|
||||
},
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue