Skip to content

Instantly share code, notes, and snippets.

@clkao
Created June 12, 2010 09:17
Show Gist options
  • Save clkao/435591 to your computer and use it in GitHub Desktop.
Save clkao/435591 to your computer and use it in GitHub Desktop.
my @keys = map {
my $k = $env->{'HTTP_SEC_WEBSOCKET_KEY'.$_};
join('', $k =~ m/\d/g) / scalar @{[$k =~ m/ /g]};
} (1,2);
$h->push_write($hs);
$h->push_write(md5(pack('NN', @keys) . $key3));
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment