I was working through an issue in GitLFS that traced down to an apparently errant behavior in spnego. On Windows, in the spnego_windows.go file, the SetSPNEGOHeader attempts to form a Canonicalized hostname from the given URL's hostname without ever trying the given host. In any environment with multiple services on a given IP, this could result in an incorrect SPN being chosen. This canonicalization is a good attempt at recovering from an SPN missing for a service, but causes intermittent incorrect SPN selection when the given host is valid and multiple hosts share an IP address.