mirror of
https://github.com/distribution/distribution.git
synced 2025-09-20 10:47:26 +00:00
Simplify auth.Challenge interface to SetHeaders
This removes the erroneous http.Handler interface in favor a simple SetHeaders method that only operattes on the response. Several unnecessary uses of pointer types were also fixed up. Signed-off-by: Stephen J Day <stephen.day@docker.com>
This commit is contained in:
@@ -21,7 +21,7 @@ func TestSillyAccessController(t *testing.T) {
|
||||
if err != nil {
|
||||
switch err := err.(type) {
|
||||
case auth.Challenge:
|
||||
err.ServeHTTP(w, r)
|
||||
err.SetHeaders(w)
|
||||
w.WriteHeader(http.StatusUnauthorized)
|
||||
return
|
||||
default:
|
||||
|
Reference in New Issue
Block a user