diff --git a/spnego.go b/spnego.go index 4f9c61f..70c331b 100644 --- a/spnego.go +++ b/spnego.go @@ -40,6 +40,11 @@ func getHostname(req *http.Request, canonicalize bool) (string, error) { if req.Host != "" { h = req.Host } + // I can't think why you'd want to canonicalize an overridden Host + // header (you're likely to get the hostname in the URL, which is what + // you're overriding in the first place). But since it can be disabled, + // leave it here in the flow so that Host header hostnames can be + // canonicalized if desired. if canonicalize { if h, err = canonicalizeHostname(h); err != nil { return "", err