From f01a70c8a63731a3d35473ab3a4367b8465efb80 Mon Sep 17 00:00:00 2001 From: Ted Reed Date: Fri, 6 Nov 2015 17:10:28 -0800 Subject: [PATCH] De-obfuscate error message Previously, this error message would stringify as a pointer address, which isn't particularly helpful. This change breaks out the elements of the challenge object such that the error is appropriately represented. Signed-off-by: Ted Reed --- docs/auth/htpasswd/access.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs/auth/htpasswd/access.go b/docs/auth/htpasswd/access.go index 5ac3d84a..82d3556d 100644 --- a/docs/auth/htpasswd/access.go +++ b/docs/auth/htpasswd/access.go @@ -94,7 +94,7 @@ func (ch challenge) SetHeaders(w http.ResponseWriter) { } func (ch challenge) Error() string { - return fmt.Sprintf("basic authentication challenge: %#v", ch) + return fmt.Sprintf("basic authentication challenge for realm %q: %s", ch.realm, ch.err) } func init() {