|
@@ -99,8 +99,8 @@ func checkSameOrigin(r *http.Request) bool {
|
99
|
99
|
func (u *Upgrader) selectSubprotocol(r *http.Request, responseHeader http.Header) string {
|
100
|
100
|
if u.Subprotocols != nil {
|
101
|
101
|
clientProtocols := Subprotocols(r)
|
102
|
|
- for _, serverProtocol := range u.Subprotocols {
|
103
|
|
- for _, clientProtocol := range clientProtocols {
|
|
102
|
+ for _, clientProtocol := range clientProtocols {
|
|
103
|
+ for _, serverProtocol := range u.Subprotocols {
|
104
|
104
|
if clientProtocol == serverProtocol {
|
105
|
105
|
return clientProtocol
|
106
|
106
|
}
|