Open up v2 http status code checks for put and head checks#10403
Merged
tiborvass merged 1 commit intomoby:masterfrom Jan 28, 2015
Merged
Open up v2 http status code checks for put and head checks#10403tiborvass merged 1 commit intomoby:masterfrom
tiborvass merged 1 commit intomoby:masterfrom
Conversation
Under certain cases, such as when putting a manifest or check for the existence of a layer, the status code checks in session_v2.go were too narrow for their purpose. In the case of putting a manifest, the handler only cares that an error is not returned. Whether it is a 304 or 202 does not matter, as long as the server reports success. Having the client only accept specific http codes inhibits future protocol evolution. Signed-off-by: Stephen J Day <[email protected]>
Contributor
Author
Contributor
Author
There was a problem hiding this comment.
switch implies coverage over an input domain, which is what we want here. Arguably, default return should be pulled up into switch for clarity.
Contributor
There was a problem hiding this comment.
You're not covering input domain of http status codes here and this looks just weird.
Contributor
|
This sounds reasonable to me, and has very low impact. I'm not going to take position in the style comments, so LGTM! |
Contributor
|
@LK4D4 Do we have your LGTM or do you feel your comments are blockers? |
Contributor
|
LGTM |
Contributor
|
LGTM |
tiborvass
added a commit
that referenced
this pull request
Jan 28, 2015
Open up v2 http status code checks for put and head checks
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Under certain cases, such as when putting a manifest or check for the existence
of a layer, the status code checks in session_v2.go were too narrow for their
purpose. In the case of putting a manifest, the handler only cares that an
error is not returned. Whether it is a 304 or 202 does not matter, as long as
the server reports success. Having the client only accept specific http codes
inhibits future protocol evolution.
Signed-off-by: Stephen J Day [email protected]
Closes #10402.