// AddSPNEGONegotiate adds a Negotiate header with the value of a serialized // token to an http header. func AddSPNEGONegotiate(h http.Header, name string, token *gssapi.Buffer) { if name == "" { return } v := "Negotiate" if token.Length() != 0 { data := token.Bytes() v = v + " " + base64.StdEncoding.EncodeToString(data) } h.Set(name, v) }