Skip to content

Commit

Permalink
WS: set masked bit on client frames
Browse files Browse the repository at this point in the history
also tell that we only support binary
  • Loading branch information
Bernhard M. Wiedemann committed Feb 9, 2014
1 parent 90325dc commit 1ece202
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions wsconnectionproxy.pl
Original file line number Diff line number Diff line change
Expand Up @@ -78,7 +78,7 @@ ($)

parseoptions();

my @header=("Sec-WebSocket-Protocol: binary, base64");
my @header=("Sec-WebSocket-Protocol: binary");
if($options{to}=~m/token=([^;&]*)/) {
push(@header, "Cookie: token=$1");
}
Expand Down Expand Up @@ -199,7 +199,7 @@ ($)
}
} else {
# ws-encapsulate
$frame=Protocol::WebSocket::Frame->new($_);
$frame=Protocol::WebSocket::Frame->new(buffer=>$_, masked=>1, type=>'binary');
$_=$frame->to_bytes;
}
syswrite($clientdata{$client}->{fd}, $_) if $clientdata{$client};
Expand Down

0 comments on commit 1ece202

Please sign in to comment.