Move challenge http status code logic
See: d796729b6b/registry/handlers/app.go (L498)
Per the comment on line 498, this moves the logic of setting the http
status code into the serveJSON func, leaving the auth.Challenge.ServeHTTP()
func to just set the auth challenge header.
Signed-off-by: Doug Davis <dug@us.ibm.com>
This commit is contained in:
parent
fa67bab1c7
commit
cff1a5ffdc
8 changed files with 9 additions and 19 deletions
|
@ -24,7 +24,7 @@ var (
|
|||
Description: `The access controller denied access for the operation on
|
||||
a resource. Often this will be accompanied by a 401 Unauthorized
|
||||
response status.`,
|
||||
HTTPStatusCode: http.StatusForbidden,
|
||||
HTTPStatusCode: http.StatusUnauthorized,
|
||||
})
|
||||
|
||||
// ErrorCodeDigestInvalid is returned when uploading a blob if the
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue