File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -13170,15 +13170,9 @@ WebSocketClient.prototype.$ondata = function(data) {
1317013170
1317113171 var tmp ;
1317213172
13173- // @TODO : add a check for mixin types (text/binary)
1317413173 switch ( current . type === 0x00 ? current . type2 : current . type ) {
1317513174 case 0x01 :
1317613175
13177- if ( this . type === 1 ) {
13178- this . close ( 'Invalid data type.' ) ;
13179- return ;
13180- }
13181-
1318213176 // text
1318313177 if ( this . inflate ) {
1318413178 current . final && this . parseInflate ( ) ;
@@ -13196,12 +13190,6 @@ WebSocketClient.prototype.$ondata = function(data) {
1319613190 case 0x02 :
1319713191
1319813192 // binary
13199-
13200- if ( this . type !== 1 ) {
13201- this . close ( 'Invalid data type.' ) ;
13202- return ;
13203- }
13204-
1320513193 if ( this . inflate ) {
1320613194 current . final && this . parseInflate ( ) ;
1320713195 } else {
Original file line number Diff line number Diff line change @@ -258,11 +258,6 @@ WebSocketClient.prototype.$ondata = function(data) {
258258 switch ( current . type === 0x00 ? current . type2 : current . type ) {
259259 case 0x01 :
260260
261- if ( this . type === 1 ) {
262- this . close ( 'Invalid data type.' ) ;
263- return ;
264- }
265-
266261 // text
267262 if ( this . inflate ) {
268263 current . final && this . parseInflate ( ) ;
@@ -278,14 +273,7 @@ WebSocketClient.prototype.$ondata = function(data) {
278273 break ;
279274
280275 case 0x02 :
281-
282276 // binary
283-
284- if ( this . type !== 1 ) {
285- this . close ( 'Invalid data type.' ) ;
286- return ;
287- }
288-
289277 if ( this . inflate ) {
290278 current . final && this . parseInflate ( ) ;
291279 } else {
@@ -440,6 +428,7 @@ WebSocketClient.prototype.$readbody = function() {
440428
441429WebSocketClient . prototype . $decode = function ( ) {
442430 var data = this . current . body ;
431+
443432 switch ( this . options . type ) {
444433
445434 case 'binary' : // BINARY
You can’t perform that action at this time.
0 commit comments