Commit d545a2e Martijn Croonen
committed
1 parent 1def343 commit d545a2e Copy full SHA for d545a2e
File tree 1 file changed +2
-16
lines changed
1 file changed +2
-16
lines changed Original file line number Diff line number Diff line change @@ -405,22 +405,8 @@ protected function parseHandshake()
405
405
/**
406
406
* The Sec-WebSocket-Version is a non-optional part of the opening handshake and should
407
407
* have a value from $m_aAcceptedVersions. We don't support all versions of the protocol
408
- * First build an array of versions accepted by the client*/
409
- $ aClientVersions = explode (', ' , $ this -> getHeader ('Sec-WebSocket-Version ' ));
410
-
411
- /* Trim values */
412
- array_map ('trim ' , $ aClientVersions );
413
-
414
- /* Get in common values. The protocols that appear first in the $m_aAcceptedVersions array
415
- * have the preference. */
416
- $ aInCommomVersions = array_intersect ($ this -> m_aAcceptedVersions , $ aClientVersions );
417
-
418
- /* Look for a match */
419
- if (count ($ aInCommomVersions ) > 0 )
420
- {
421
- $ sProtocolVersion = $ aInCommomVersions [0 ];
422
- }
423
- else
408
+ */
409
+ if (array_key_exists ($ this -> getHeader ('Sec-WebSocket-Version ' ), $ this -> m_aAcceptedVersions ))
424
410
{
425
411
/* Close the connection if none is supported and include the accepted versions
426
412
* in the message so the client can retry with on of those. */
You can’t perform that action at this time.
0 commit comments