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

Update blob patch status code to correct code #67

Merged
merged 1 commit into from
Aug 14, 2019

Conversation

dmcgowan
Copy link
Member

The PATCH blob upload endpoint returns a 202 Accepted when a chunk
is accepted rather than a 204. The 204 is returned by the PUT
endpoint after completion of an upload is successful. The status
code in the detail section must match the protocol as described
in the description for upload patching. It is stated at the beginning
of the detail section that when the detail does not match, the
description above it is correct.

The PATCH blob upload endpoint returns a 202 Accepted when a chunk
is accepted rather than a 204. The 204 is returned by the PUT
endpoint after completion of an upload is successful. The status
code in the detail section must match the protocol as described
in the description for upload patching. It is stated at the beginning
of the detail section that when the detail does not match, the
description above it is correct.

Signed-off-by: Derek McGowan <[email protected]>
@vbatts
Copy link
Member

vbatts commented Aug 12, 2019

LGTM

Approved with PullApprove

Copy link
Member

@mikebrow mikebrow left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

/LGTM

@jzelinskie
Copy link
Member

Are we at a point where we could write a test for this?

@vbatts
Copy link
Member

vbatts commented Aug 12, 2019

the tests in place do some, but not all.
#39 was never merged, which went further

@jonjohnsonjr
Copy link
Contributor

The 204 is returned by the PUT endpoint after completion of an upload is successful.

Is this actually true? AFAICT registries actually return a 201 here, and the spec has a similar discrepancy between the prose and the detail.

@dmcgowan
Copy link
Member Author

@jonjohnsonjr you are right, that one has a mismatch as well. It seems the only 204 should be on the upload progress. Delete is also wrong. I'll open up a separate PR for those so the status codes can be evaluated separately. Ideally we can get rid of the disclaimer at the top of the detail section stating that it may be wrong :)

@vbatts vbatts merged commit 676c17d into opencontainers:master Aug 14, 2019
@vbatts vbatts mentioned this pull request Sep 30, 2020
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 this pull request may close these issues.

5 participants