control/controlhttp: remove ClientConn.UntrustedUpgradeHeaders

It was just added and unreleased but we've decided to go a different route.

Details are in 5e9e57ecf5.

Updates #5972

Change-Id: I49016af469225f58535f63a9b0fbe5ab6a5bf304
Signed-off-by: Brad Fitzpatrick <bradfitz@tailscale.com>
This commit is contained in:
Brad Fitzpatrick
2022-10-28 12:14:58 -07:00
committed by Brad Fitzpatrick
parent b2035a1dca
commit dfe67afb4a
3 changed files with 11 additions and 23 deletions

View File

@@ -46,7 +46,7 @@ func (d *Dialer) Dial(ctx context.Context) (*ClientConn, error) {
handshakeHeaderName: []string{base64.StdEncoding.EncodeToString(init)},
}.Encode(),
}
wsConn, httpRes, err := websocket.Dial(ctx, wsURL.String(), &websocket.DialOptions{
wsConn, _, err := websocket.Dial(ctx, wsURL.String(), &websocket.DialOptions{
Subprotocols: []string{upgradeHeaderValue},
})
if err != nil {
@@ -58,8 +58,5 @@ func (d *Dialer) Dial(ctx context.Context) (*ClientConn, error) {
netConn.Close()
return nil, err
}
return &ClientConn{
Conn: cbConn,
UntrustedUpgradeHeaders: httpRes.Header,
}, nil
return &ClientConn{Conn: cbConn}, nil
}