From 39d47e8eea0e1f007e6f2db98ae303a1871065e9 Mon Sep 17 00:00:00 2001 From: Tianon Gravi Date: Tue, 20 Oct 2015 06:57:15 -0700 Subject: [PATCH] Update "type auth.Challenge" comment example code This interface was changed in a0fdfb9d4dd6e84703d155d9c1f3c72d52324814, but the comment wasn't ever updated to match. Signed-off-by: Andrew "Tianon" Page --- registry/auth/auth.go | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/registry/auth/auth.go b/registry/auth/auth.go index 862c8d28c..b3bb580d2 100644 --- a/registry/auth/auth.go +++ b/registry/auth/auth.go @@ -21,7 +21,9 @@ // if ctx, err := accessController.Authorized(ctx, access); err != nil { // if challenge, ok := err.(auth.Challenge) { // // Let the challenge write the response. -// challenge.ServeHTTP(w, r) +// challenge.SetHeaders(w) +// w.WriteHeader(http.StatusUnauthorized) +// return // } else { // // Some other error. // }