Skip to content

Commit

Permalink
fix bug when sec-websocket-protocol and sec-websocket-extensions appe…
Browse files Browse the repository at this point in the history
…ar in header
  • Loading branch information
Seraphli committed Aug 30, 2017
1 parent cdf50bd commit 4cbdcd6
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions ws4py/client/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -333,10 +333,10 @@ def process_handshake_header(self, headers):
raise HandshakeError("Invalid challenge response: %s" % value)

elif header == b'sec-websocket-protocol':
protocols = ','.join(value)
protocols.append(value.decode('utf-8'))

elif header == b'sec-websocket-extensions':
extensions = ','.join(value)
extensions.append(value.decode('utf-8'))

return protocols, extensions

Expand Down

0 comments on commit 4cbdcd6

Please sign in to comment.