Update go dependencies
This commit is contained in:
parent
a46126a034
commit
3eafaa35a1
1108 changed files with 32555 additions and 83490 deletions
8
vendor/k8s.io/apimachinery/pkg/util/httpstream/httpstream.go
generated
vendored
8
vendor/k8s.io/apimachinery/pkg/util/httpstream/httpstream.go
generated
vendored
|
|
@ -123,15 +123,11 @@ func negotiateProtocol(clientProtocols, serverProtocols []string) string {
|
|||
func Handshake(req *http.Request, w http.ResponseWriter, serverProtocols []string) (string, error) {
|
||||
clientProtocols := req.Header[http.CanonicalHeaderKey(HeaderProtocolVersion)]
|
||||
if len(clientProtocols) == 0 {
|
||||
// Kube 1.0 clients didn't support subprotocol negotiation.
|
||||
// TODO require clientProtocols once Kube 1.0 is no longer supported
|
||||
return "", nil
|
||||
return "", fmt.Errorf("unable to upgrade: %s is required", HeaderProtocolVersion)
|
||||
}
|
||||
|
||||
if len(serverProtocols) == 0 {
|
||||
// Kube 1.0 servers didn't support subprotocol negotiation. This is mainly for testing.
|
||||
// TODO require serverProtocols once Kube 1.0 is no longer supported
|
||||
return "", nil
|
||||
panic(fmt.Errorf("unable to upgrade: serverProtocols is required"))
|
||||
}
|
||||
|
||||
negotiatedProtocol := negotiateProtocol(clientProtocols, serverProtocols)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue