Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Pulling a blob doesn't specify 307 as a valid response status code #397

Open
sajayantony opened this issue Mar 31, 2023 · 4 comments
Open

Comments

@sajayantony
Copy link
Member

The specification currently expects a registry to return 200 status code on GET on pulling a blob which may not be the case with many implementations. A 307 is a valid response and it seems like this might have been missed in the spec.

A GET request to an existing blob URL MUST provide the expected blob, with a response code that MUST be `200 OK`.
A successful response SHOULD contain the digest of the uploaded blob in the header `Docker-Content-Digest`.
If present, the value of this header MUST be a digest matching that of the response body.
@sajayantony sajayantony changed the title Pulling a blob doesn't specify 307 as a valid request Pulling a blob doesn't specify 307 as a valid response status code Mar 31, 2023
@northtyphoon
Copy link

Should the spec also allow 206 partial content success status?

@mikebrow
Copy link
Member

mikebrow commented Apr 4, 2023

@sajayantony the wording here is covering the success case for an "existing blob." As for redirect failure.. I don't think we've added redirects to the distribution spec yet.. but I see you have a PR for that. #398 :-)

@northtyphoon partial content is not supported because the digest is calculated against the entire blob..

@sajayantony
Copy link
Member Author

sajayantony commented May 3, 2023

Would like to get feedback if we should just add this to pull manifest and blobs - as per @sudo-bmitch

#398 (comment)

http redirect status codes should be supported by clients according to https://www.rfc-editor.org/rfc/rfc7231#section-6.4

@sudo-bmitch
Copy link
Contributor

Would like to get feedback if we should just add this to pull manifest and blobs - as per @sudo-bmitch

#398 (comment)

http redirect status codes should be supported by clients according to https://www.rfc-editor.org/rfc/rfc7231#section-6.4

I'd lean towards adding a section to API indicating that clients and servers should follow the HTTP RFCs unless directed otherwise in the distribution spec.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

4 participants